From f99c8a0b70c604565731d2c7c000629806d755b4 Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 16 Feb 2014 19:13:48 +0100 Subject: [PATCH] merge common parts of encoding shaders --- Source/Core/VideoCommon/TextureConversionShader.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index a7db33418f..6b9e1af370 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -105,6 +105,7 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType) WRITE(p, " sampleUv.x = xib + halfxb * %d;\n", blkW); WRITE(p, " sampleUv.y = yb + xoff;\n"); + WRITE(p, " bool first = xb == (halfxb * 2);\n"); } void WriteSampleColor(char*& p, const char* colorComp, const char* dest, int xoffset, API_TYPE ApiType) @@ -373,8 +374,6 @@ void WriteRGBA8Encoder(char* p,API_TYPE ApiType) { WriteSwizzler(p, GX_TF_RGBA8, ApiType); - WRITE(p, " bool first = xb == (halfxb * 2);\n"); - WRITE(p, " float4 texSample;\n"); WRITE(p, " float4 color0;\n"); WRITE(p, " float4 color1;\n"); @@ -563,8 +562,6 @@ void WriteZ24Encoder(char* p, API_TYPE ApiType) { WriteSwizzler(p, GX_TF_Z24X8, ApiType); - WRITE(p, " bool first = xb == (halfxb * 2);\n"); - WRITE(p, " float depth0;\n"); WRITE(p, " float depth1;\n"); WRITE(p, " float3 expanded0;\n");