mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 22:08:26 +02:00
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:
parent
6b7b8738b3
commit
eb1f163848
2 changed files with 5 additions and 2 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue