diff options
author | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-08-21 10:46:18 +0400 |
---|---|---|
committer | Stanislav Vorobiov <s.vorobiov@samsung.com> | 2014-08-21 10:46:50 +0400 |
commit | ca74e1c50087cdb6733c8957c8f51430607d1a87 (patch) | |
tree | f7ee228fb59bb54d4bc28030009884ffc10ad45a | |
parent | 9d7fa5e687807b38176f7ac7b414f98edba4eec3 (diff) | |
download | qemu-ca74e1c50087cdb6733c8957c8f51430607d1a87.tar.gz qemu-ca74e1c50087cdb6733c8957c8f51430607d1a87.tar.bz2 qemu-ca74e1c50087cdb6733c8957c8f51430607d1a87.zip |
VIGS: Fix texture fetch for GL3
Should be texture, not texture2D
Change-Id: Ia4ba1ce99a6afa7e786f8ef6a7176eeba76cc504
Signed-off-by: Stanislav Vorobiov <s.vorobiov@samsung.com>
-rw-r--r-- | hw/vigs/vigs_gl_backend.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/vigs/vigs_gl_backend.c b/hw/vigs/vigs_gl_backend.c index 7baa7df192..3aefd3b033 100644 --- a/hw/vigs/vigs_gl_backend.c +++ b/hw/vigs/vigs_gl_backend.c @@ -265,11 +265,11 @@ static const char *g_fs_nv21_source_gl3 = "{\n" " float ypos = floor((1.0 - v_texCoord.y) * size.y) * size.x + floor(v_texCoord.x * size.x);\n" " float ytexPos = floor(ypos / 4);\n" - " vec4 ytexColor = texture2D(ytex, vec2((mod(ytexPos, ytexSize.x) + 0.5) / ytexSize.x, 1.0 - (floor(ytexPos / ytexSize.x) + 0.5) / ytexSize.y));\n" + " vec4 ytexColor = texture(ytex, vec2((mod(ytexPos, ytexSize.x) + 0.5) / ytexSize.x, 1.0 - (floor(ytexPos / ytexSize.x) + 0.5) / ytexSize.y));\n" " float y = ytexColor[3 - int(mod(ypos + 1, 4))];\n" " float cpos = floor(floor((1.0 - v_texCoord.y) * size.y) / 2) * size.x + floor(v_texCoord.x * size.x);\n" " float ctexPos = floor(cpos / 4);\n" - " vec4 ctexColor = texture2D(ctex, vec2((mod(ctexPos, ctexSize.x) + 0.5) / ctexSize.x, 1.0 - (floor(ctexPos / ctexSize.x) + 0.5) / ctexSize.y));\n" + " vec4 ctexColor = texture(ctex, vec2((mod(ctexPos, ctexSize.x) + 0.5) / ctexSize.x, 1.0 - (floor(ctexPos / ctexSize.x) + 0.5) / ctexSize.y));\n" " int index = 2 * int(mod(floor(cpos / 2) + 1, 2));" " float u = ctexColor[index];\n" " float v = ctexColor[3 - index];\n" @@ -345,12 +345,12 @@ static const char *g_fs_yuv420_source_gl3 = "{\n" " float ypos = floor((1.0 - v_texCoord.y) * size.y) * size.x + floor(v_texCoord.x * size.x);\n" " float ytexPos = floor(ypos / 4);\n" - " vec4 ytexColor = texture2D(ytex, vec2((mod(ytexPos, ytexSize.x) + 0.5) / ytexSize.x, 1.0 - (floor(ytexPos / ytexSize.x) + 0.5) / ytexSize.y));\n" + " vec4 ytexColor = texture(ytex, vec2((mod(ytexPos, ytexSize.x) + 0.5) / ytexSize.x, 1.0 - (floor(ytexPos / ytexSize.x) + 0.5) / ytexSize.y));\n" " float y = ytexColor[3 - int(mod(ypos + 1, 4))];\n" " float uvpos = floor(floor((1.0 - v_texCoord.y) * size.y) / 2) * size.x + floor(v_texCoord.x * size.x);\n" " float uvtexPos = floor(uvpos / 8);\n" - " vec4 utexColor = texture2D(utex, vec2((mod(uvtexPos, utexSize.x) + 0.5) / utexSize.x, 1.0 - (floor(uvtexPos / utexSize.x) + 0.5) / utexSize.y));\n" - " vec4 vtexColor = texture2D(vtex, vec2((mod(uvtexPos, vtexSize.x) + 0.5) / vtexSize.x, 1.0 - (floor(uvtexPos / vtexSize.x) + 0.5) / vtexSize.y));\n" + " vec4 utexColor = texture(utex, vec2((mod(uvtexPos, utexSize.x) + 0.5) / utexSize.x, 1.0 - (floor(uvtexPos / utexSize.x) + 0.5) / utexSize.y));\n" + " vec4 vtexColor = texture(vtex, vec2((mod(uvtexPos, vtexSize.x) + 0.5) / vtexSize.x, 1.0 - (floor(uvtexPos / vtexSize.x) + 0.5) / vtexSize.y));\n" " int index = 3 - int(mod((uvpos / 2) + 1, 4));\n" " float u = utexColor[index];\n" " float v = vtexColor[index];\n" |