From f244ed1c522a1cdec2ca9fab6cd8c3407f5419d1 Mon Sep 17 00:00:00 2001 From: Ehsan Nasiri Date: Fri, 30 Jun 2017 18:58:19 -0400 Subject: [PATCH] Fix for variable pointer (writes) in tess.control Use patch index to avoid multiple increments VK-GL-CTS issue: 543 Components: Vulkan Affects: dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes*tess* Change-Id: If518fdae084722cc28f19044186dbda07880a50c --- android/cts/master/src/vk-excluded-tests.txt | 3 --- android/cts/master/vk-master.txt | 4 ++++ .../vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp | 10 ++++++++-- external/vulkancts/mustpass/1.0.2/src/excluded-tests.txt | 3 --- external/vulkancts/mustpass/1.0.2/vk-default.txt | 4 ++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/android/cts/master/src/vk-excluded-tests.txt b/android/cts/master/src/vk-excluded-tests.txt index 5d9bb10..6c97232 100644 --- a/android/cts/master/src/vk-excluded-tests.txt +++ b/android/cts/master/src/vk-excluded-tests.txt @@ -325,6 +325,3 @@ dEQP-VK.pipeline.render_to_image.*.small.r8g8b8a8_unorm_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r32_uint_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r16g16_sint_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r32g32b32a32_sfloat_d32_sfloat_s8_uint - -#VK-GL-CTS 543 -dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes*tess* diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 8e064b9..985c3dc 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -139123,6 +139123,8 @@ dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opp dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_single_buffer_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_single_buffer_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_vert +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_tessc +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_tesse dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opselect_two_buffers_vert @@ -139161,6 +139163,8 @@ dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opp dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_two_buffers_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_two_buffers_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_vert +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_tessc +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_tesse dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.multi_buffer_read_only_graphics.opselect_outer_struct_second_input_vert diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp index d983547..cd36dd7 100644 --- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp +++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp @@ -554,13 +554,14 @@ string makeTessControlShaderAssembly (const map& fragments) "${capability:opt}\n" "${extension:opt}\n" "OpMemoryModel Logical GLSL450\n" - "OpEntryPoint TessellationControl %BP_main \"main\" %BP_out_color %BP_gl_InvocationID %BP_in_color %BP_gl_out %BP_gl_in %BP_gl_TessLevelOuter %BP_gl_TessLevelInner ${IF_entrypoint:opt} \n" + "OpEntryPoint TessellationControl %BP_main \"main\" %BP_out_color %BP_gl_InvocationID %BP_gl_PrimitiveID %BP_in_color %BP_gl_out %BP_gl_in %BP_gl_TessLevelOuter %BP_gl_TessLevelInner ${IF_entrypoint:opt} \n" "OpExecutionMode %BP_main OutputVertices 3\n" "${debug:opt}\n" "OpName %BP_main \"main\"\n" "OpName %test_code \"testfun(vf4;\"\n" "OpName %BP_out_color \"out_color\"\n" "OpName %BP_gl_InvocationID \"gl_InvocationID\"\n" + "OpName %BP_gl_PrimitiveID \"gl_PrimitiveID\"\n" "OpName %BP_in_color \"in_color\"\n" "OpName %BP_gl_PerVertex \"gl_PerVertex\"\n" "OpMemberName %BP_gl_PerVertex 0 \"gl_Position\"\n" @@ -578,6 +579,7 @@ string makeTessControlShaderAssembly (const map& fragments) "OpName %BP_gl_TessLevelInner \"gl_TessLevelInner\"\n" "OpDecorate %BP_out_color Location 1\n" "OpDecorate %BP_gl_InvocationID BuiltIn InvocationId\n" + "OpDecorate %BP_gl_PrimitiveID BuiltIn PrimitiveId\n" "OpDecorate %BP_in_color Location 1\n" "OpMemberDecorate %BP_gl_PerVertex 0 BuiltIn Position\n" "OpMemberDecorate %BP_gl_PerVertex 1 BuiltIn PointSize\n" @@ -600,6 +602,7 @@ string makeTessControlShaderAssembly (const map& fragments) SPIRV_ASSEMBLY_ARRAYS "%BP_out_color = OpVariable %op_a3v4f32 Output\n" "%BP_gl_InvocationID = OpVariable %ip_i32 Input\n" + "%BP_gl_PrimitiveID = OpVariable %ip_i32 Input\n" "%BP_in_color = OpVariable %ip_a32v4f32 Input\n" "%BP_gl_PerVertex = OpTypeStruct %v4f32 %f32 %a1f32 %a1f32\n" "%BP_a3_gl_PerVertex = OpTypeArray %BP_gl_PerVertex %c_u32_3\n" @@ -650,7 +653,10 @@ string makeTessControlShaderAssembly (const map& fragments) "%isUniqueIdZero = OpFunction %bool None %bool_function\n" "%getId_label = OpLabel\n" "%invocation_id = OpLoad %i32 %BP_gl_InvocationID\n" - "%is_id_0 = OpIEqual %bool %invocation_id %c_i32_0\n" + "%primitive_id = OpLoad %i32 %BP_gl_PrimitiveID\n" + "%is_invocation_0 = OpIEqual %bool %invocation_id %c_i32_0\n" + "%is_primitive_0 = OpIEqual %bool %primitive_id %c_i32_0\n" + "%is_id_0 = OpLogicalAnd %bool %is_invocation_0 %is_primitive_0\n" "OpReturnValue %is_id_0\n" "OpFunctionEnd\n" diff --git a/external/vulkancts/mustpass/1.0.2/src/excluded-tests.txt b/external/vulkancts/mustpass/1.0.2/src/excluded-tests.txt index 5d9bb10..6c97232 100644 --- a/external/vulkancts/mustpass/1.0.2/src/excluded-tests.txt +++ b/external/vulkancts/mustpass/1.0.2/src/excluded-tests.txt @@ -325,6 +325,3 @@ dEQP-VK.pipeline.render_to_image.*.small.r8g8b8a8_unorm_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r32_uint_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r16g16_sint_d32_sfloat_s8_uint dEQP-VK.pipeline.render_to_image.*.small.r32g32b32a32_sfloat_d32_sfloat_s8_uint - -#VK-GL-CTS 543 -dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes*tess* diff --git a/external/vulkancts/mustpass/1.0.2/vk-default.txt b/external/vulkancts/mustpass/1.0.2/vk-default.txt index e4656ee..b1479c4 100644 --- a/external/vulkancts/mustpass/1.0.2/vk-default.txt +++ b/external/vulkancts/mustpass/1.0.2/vk-default.txt @@ -139120,6 +139120,8 @@ dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opp dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_single_buffer_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_single_buffer_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_vert +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_tessc +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_tesse dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_single_buffer_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opselect_two_buffers_vert @@ -139158,6 +139160,8 @@ dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opp dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_two_buffers_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.reads_opptraccesschain_two_buffers_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_vert +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_tessc +dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_tesse dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_geom dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.graphics.writes_two_buffers_frag dEQP-VK.spirv_assembly.instruction.graphics.variable_pointers.multi_buffer_read_only_graphics.opselect_outer_struct_second_input_vert -- 2.7.4