aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2020-07-03 12:03:00 +0200
committerMarge Bot <[email protected]>2020-07-07 08:10:47 +0000
commitf69c3849b8c397f48a8d6f22d1991ae927a31657 (patch)
treeaa95bfc4583e8d39c28648d4f539e79883c719b9 /src/freedreno/vulkan
parent4f91345f4923134b226ecd94e5636ea81c97e284 (diff)
tu: Force gl_Layer to 0 when necessary
In particular this will help us implement input attachments correctly with layered rendering. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5732>
Diffstat (limited to 'src/freedreno/vulkan')
-rw-r--r--src/freedreno/vulkan/tu_pipeline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c
index 965aa34209f..4a21a1514ee 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -1977,6 +1977,10 @@ tu_pipeline_builder_compile_shaders(struct tu_pipeline_builder *builder,
builder->shaders[stage] = shader;
}
+ struct tu_shader *gs = builder->shaders[MESA_SHADER_GEOMETRY];
+ key.layer_zero =
+ !gs || !(gs->ir3_shader->nir->info.outputs_written & VARYING_SLOT_LAYER);
+
pipeline->tess.patch_type = key.tessellation;
for (gl_shader_stage stage = MESA_SHADER_VERTEX;