zink/ntv: Only emit GeometryStreams cap if multiple streams are used
From the SPIR-V spec: GeometryStreams: Uses multiple numbered streams for geometry-stage output. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33723>
This commit is contained in:
committed by
Marge Bot
parent
6b7b8738b3
commit
eb1f163848
@@ -4644,8 +4644,6 @@ nir_to_spirv(struct nir_shader *s, const struct zink_shader_info *sinfo, const s
|
||||
|
||||
case MESA_SHADER_GEOMETRY:
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityGeometry);
|
||||
if (s->info.gs.active_stream_mask)
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityGeometryStreams);
|
||||
if (s->info.outputs_written & BITFIELD64_BIT(VARYING_SLOT_PSIZ))
|
||||
spirv_builder_emit_cap(&ctx.builder, SpvCapabilityGeometryPointSize);
|
||||
break;
|
||||
|
||||
@@ -281,6 +281,7 @@ spirv_builder_emit_vertex(struct spirv_builder *b, uint32_t stream, bool multist
|
||||
unsigned words = 1;
|
||||
SpvOp op = SpvOpEmitVertex;
|
||||
if (multistream) {
|
||||
spirv_builder_emit_cap(b, SpvCapabilityGeometryStreams);
|
||||
op = SpvOpEmitStreamVertex;
|
||||
words++;
|
||||
}
|
||||
@@ -295,6 +296,10 @@ spirv_builder_end_primitive(struct spirv_builder *b, uint32_t stream, bool multi
|
||||
{
|
||||
unsigned words = 1;
|
||||
SpvOp op = SpvOpEndPrimitive;
|
||||
|
||||
if (multistream)
|
||||
spirv_builder_emit_cap(b, SpvCapabilityGeometryStreams);
|
||||
|
||||
if (multistream || stream > 0) {
|
||||
op = SpvOpEndStreamPrimitive;
|
||||
words++;
|
||||
|
||||
Reference in New Issue
Block a user