aboutsummaryrefslogtreecommitdiff
path: root/tests/cases/graphics_descriptor_array_combined_image_sampler.amber
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-25 07:44:24 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-08-25 07:44:24 +0000
commitd9e4c650dc4677a890d4bc85e35e2d7736d3be67 (patch)
tree7bf7238d34d1cdf3671a43fe4147a53606453504 /tests/cases/graphics_descriptor_array_combined_image_sampler.amber
parent46492d5cf09bcdeedf4e4402b2961bbb4e5d012c (diff)
parent83737eb364ef8fafbcb0f61d553aaca61949d092 (diff)
downloadamber-d9e4c650dc4677a890d4bc85e35e2d7736d3be67.tar.gz
Snap for 8992082 from 83737eb364ef8fafbcb0f61d553aaca61949d092 to gki13-boot-releasegki13-boot-release
Change-Id: Ib668e4f4e691825f20061fd52a1e0f2581b5c7ee
Diffstat (limited to 'tests/cases/graphics_descriptor_array_combined_image_sampler.amber')
-rw-r--r--tests/cases/graphics_descriptor_array_combined_image_sampler.amber13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/cases/graphics_descriptor_array_combined_image_sampler.amber b/tests/cases/graphics_descriptor_array_combined_image_sampler.amber
index d7fe3c0..e80ca1e 100644
--- a/tests/cases/graphics_descriptor_array_combined_image_sampler.amber
+++ b/tests/cases/graphics_descriptor_array_combined_image_sampler.amber
@@ -40,10 +40,16 @@ SHADER fragment frag_shader_tex GLSL
#version 430
layout(location = 0) in vec2 texcoords_in;
layout(location = 0) out vec4 color_out;
-uniform layout(set=0, binding=0) sampler2D tex_sampler[2];
+uniform layout(set=0, binding=0) sampler2D tex_sampler_0[2];
+uniform layout(set=0, binding=1) sampler2D tex_sampler_1[2];
void main() {
- color_out = texture(tex_sampler[0], texcoords_in);
- color_out = color_out + texture(tex_sampler[1], texcoords_in);
+ vec4 tex_0_color = texture(tex_sampler_0[0], texcoords_in);
+ color_out = tex_0_color + texture(tex_sampler_0[1], texcoords_in);
+ // tex_sampler_1[0] and tex_sampler_1[1] should be equal to tex_sampler_0[0]
+ if (tex_0_color != texture(tex_sampler_1[0], texcoords_in) ||
+ tex_0_color != texture(tex_sampler_1[1], texcoords_in)) {
+ color_out = vec4(1.0);
+ }
}
END
@@ -75,6 +81,7 @@ PIPELINE graphics pipeline
ATTACH vert_shader_tex
ATTACH frag_shader_tex
BIND BUFFER_ARRAY texture0 texture1 AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 0
+ BIND BUFFER_ARRAY texture0 texture0 AS combined_image_sampler SAMPLER sampler DESCRIPTOR_SET 0 BINDING 1
VERTEX_DATA position LOCATION 0
VERTEX_DATA texcoords LOCATION 1
BIND BUFFER framebuffer AS color LOCATION 0