Commit 5aa5de76 by Mohan Maiya Committed by Commit Bot

Vulkan: Keep the output variable of TCS active for barrier

OpControlBarrier implicitly synchronizes 'Output' storage class. If TCS has an out varying it should be considered active because TCS invocations themselves can read each others' outputs. Bug: angleproject:5557 Tests: KHR-GLES32.core.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_*_calls Change-Id: Ic252c0afff43a68828ee4cf5f4ba890b1b67731e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2770679Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Mohan Maiya <m.maiya@samsung.com>
parent 39d8dde8
...@@ -864,13 +864,19 @@ bool VaryingPacking::collectAndPackUserVaryings(gl::InfoLog &infoLog, ...@@ -864,13 +864,19 @@ bool VaryingPacking::collectAndPackUserVaryings(gl::InfoLog &infoLog,
bool matchedInputOutputStaticUse = (input && output && output->staticUse); bool matchedInputOutputStaticUse = (input && output && output->staticUse);
bool activeBuiltIn = (isActiveBuiltInInput || isActiveBuiltInOutput); bool activeBuiltIn = (isActiveBuiltInInput || isActiveBuiltInOutput);
// Output variable in TCS can be read as input in another invocation by barrier.
// See section 11.2.1.2.4 Tessellation Control Shader Execution Order in OpenGL ES 3.2.
bool staticUseInTCS =
(input && input->staticUse && ref.frontShaderStage == ShaderType::TessControl);
// Separable program requirements // Separable program requirements
bool separableActiveInput = (input && (input->active || !output)); bool separableActiveInput = (input && (input->active || !output));
bool separableActiveOutput = (output && (output->active || !input)); bool separableActiveOutput = (output && (output->active || !input));
bool separableActiveVarying = bool separableActiveVarying =
(isSeparableProgram && (separableActiveInput || separableActiveOutput)); (isSeparableProgram && (separableActiveInput || separableActiveOutput));
if (matchedInputOutputStaticUse || activeBuiltIn || separableActiveVarying) if (matchedInputOutputStaticUse || activeBuiltIn || separableActiveVarying ||
staticUseInTCS)
{ {
const sh::ShaderVariable *varying = output ? output : input; const sh::ShaderVariable *varying = output ? output : input;
......
...@@ -55,14 +55,10 @@ ...@@ -55,14 +55,10 @@
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.single.max_patch_vertices = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.single.max_patch_vertices = FAIL
// Bug in front-end where builtins are not correctly marked active in every stage // Bug in front-end where builtins are not correctly marked active in every stage
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_control_to_tessellation_evaluation.data_pass_through = FAIL
// Translation bugs
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_read_calls = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_read_write_calls = FAIL
// Test failures // Test failures
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_quads_tessellation.* = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_quads_tessellation.* = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_triangles_tessellation.identical_triangles = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_triangles_tessellation.identical_triangles = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_triangles_tessellation.inner_tessellation_level_rounding = FAIL 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_triangles_tessellation.inner_tessellation_level_rounding = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_tc_barriers.barrier_guarded_write_calls = FAIL
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_invariance.invariance_rule* = SKIP 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_invariance.invariance_rule* = SKIP
// Crash on assert in libcpp. CTS passes to a function '&vector[0], size', where vector is empty. // Crash on assert in libcpp. CTS passes to a function '&vector[0], size', where vector is empty.
5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_point_mode.points_verification = SKIP 5557 VULKAN WIN : KHR-GLES32.core.tessellation_shader.tessellation_shader_point_mode.points_verification = SKIP
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment