diff options
| author | Stenzek <stenzek@gmail.com> | 2017-07-20 15:25:35 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-07-30 17:43:59 +1000 |
| commit | 81b4ed2a81d7bada71a115efc7fb2347378fb975 (patch) | |
| tree | ba6884e584fc23b872f8b4679cd919085b92ddf9 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 4bf562589565636382b81313c2de0482e45743c0 (diff) | |
Vulkan: Uber shader support
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 036709aa1a..61e8f92531 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -354,21 +354,10 @@ void WritePixelShaderCommonHeader(ShaderCode& out, APIType ApiType, bool boundin "int3 iround(float3 x) { return int3(round(x)); }\n" "int4 iround(float4 x) { return int4(round(x)); }\n\n"); - if (ApiType == APIType::OpenGL) + if (ApiType == APIType::OpenGL || ApiType == APIType::Vulkan) { out.Write("SAMPLER_BINDING(0) uniform sampler2DArray samp[8];\n"); } - else if (ApiType == APIType::Vulkan) - { - out.Write("SAMPLER_BINDING(0) uniform sampler2DArray samp0;\n"); - out.Write("SAMPLER_BINDING(1) uniform sampler2DArray samp1;\n"); - out.Write("SAMPLER_BINDING(2) uniform sampler2DArray samp2;\n"); - out.Write("SAMPLER_BINDING(3) uniform sampler2DArray samp3;\n"); - out.Write("SAMPLER_BINDING(4) uniform sampler2DArray samp4;\n"); - out.Write("SAMPLER_BINDING(5) uniform sampler2DArray samp5;\n"); - out.Write("SAMPLER_BINDING(6) uniform sampler2DArray samp6;\n"); - out.Write("SAMPLER_BINDING(7) uniform sampler2DArray samp7;\n"); - } else // D3D { // Declare samplers @@ -1191,11 +1180,6 @@ static void SampleTexture(ShaderCode& out, const char* texcoords, const char* te "[%d].xy, %s))).%s;\n", texmap, texmap, texcoords, texmap, stereo ? "layer" : "0.0", texswap); } - else if (ApiType == APIType::Vulkan) - { - out.Write("iround(255.0 * texture(samp%d, float3(%s.xy * " I_TEXDIMS "[%d].xy, %s))).%s;\n", - texmap, texcoords, texmap, stereo ? "layer" : "0.0", texswap); - } else { out.Write("iround(255.0 * texture(samp[%d], float3(%s.xy * " I_TEXDIMS "[%d].xy, %s))).%s;\n", |
