From 17886a9808620630316c6e2c6694fd65fdc29a7f Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Thu, 7 Apr 2016 19:28:22 +0200 Subject: [PATCH] gsdx-ogl: allow some accurate date when GL_ARB_shader_image_load_store isn't supported Close #1282 --- plugins/GSdx/res/glsl/tfx_fs.glsl | 4 ++-- plugins/GSdx/res/glsl_source.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/res/glsl/tfx_fs.glsl b/plugins/GSdx/res/glsl/tfx_fs.glsl index 91642a8e22..cb756352d0 100644 --- a/plugins/GSdx/res/glsl/tfx_fs.glsl +++ b/plugins/GSdx/res/glsl/tfx_fs.glsl @@ -471,7 +471,7 @@ void ps_blend(inout vec4 Color, float As) void ps_main() { -#if ((PS_DATE & 3) == 1 || (PS_DATE & 3) == 2) && !defined(DISABLE_GL42_image) +#if ((PS_DATE & 3) == 1 || (PS_DATE & 3) == 2) #if PS_WRITE_RG == 1 // Pseudo 16 bits access. @@ -489,7 +489,7 @@ void ps_main() #endif if (bad) { -#if PS_DATE >= 5 +#if PS_DATE >= 5 || defined(DISABLE_GL42_image) discard; #else imageStore(img_prim_min, ivec2(gl_FragCoord.xy), ivec4(-1)); diff --git a/plugins/GSdx/res/glsl_source.h b/plugins/GSdx/res/glsl_source.h index dc04e09aa1..2c86638ffb 100644 --- a/plugins/GSdx/res/glsl_source.h +++ b/plugins/GSdx/res/glsl_source.h @@ -1362,7 +1362,7 @@ static const char* tfx_fs_all_glsl = "\n" "void ps_main()\n" "{\n" - "#if ((PS_DATE & 3) == 1 || (PS_DATE & 3) == 2) && !defined(DISABLE_GL42_image)\n" + "#if ((PS_DATE & 3) == 1 || (PS_DATE & 3) == 2)\n" "\n" "#if PS_WRITE_RG == 1\n" " // Pseudo 16 bits access.\n" @@ -1380,7 +1380,7 @@ static const char* tfx_fs_all_glsl = "#endif\n" "\n" " if (bad) {\n" - "#if PS_DATE >= 5\n" + "#if PS_DATE >= 5 || defined(DISABLE_GL42_image)\n" " discard;\n" "#else\n" " imageStore(img_prim_min, ivec2(gl_FragCoord.xy), ivec4(-1));\n"