mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 06:48:19 +02:00
nir/spirv: Add capabilities and decorations for basic geometry shaders
This commit is contained in:
parent
d538fe849d
commit
ea23cb3543
1 changed files with 15 additions and 6 deletions
|
|
@ -400,6 +400,10 @@ type_decoration_cb(struct vtn_builder *b,
|
|||
/* Ignore these, since we get explicit offsets anyways */
|
||||
break;
|
||||
|
||||
case SpvDecorationStream:
|
||||
assert(dec->literals[0] == 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
unreachable("Unhandled type decoration");
|
||||
}
|
||||
|
|
@ -2473,12 +2477,17 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
|
|||
break;
|
||||
|
||||
case SpvOpCapability:
|
||||
/*
|
||||
* TODO properly handle these and give a real error if asking for too
|
||||
* much.
|
||||
*/
|
||||
assert(w[1] == SpvCapabilityMatrix ||
|
||||
w[1] == SpvCapabilityShader);
|
||||
switch ((SpvCapability)w[1]) {
|
||||
case SpvCapabilityMatrix:
|
||||
case SpvCapabilityShader:
|
||||
/* All shaders support these */
|
||||
break;
|
||||
case SpvCapabilityGeometry:
|
||||
assert(b->shader->stage == MESA_SHADER_GEOMETRY);
|
||||
break;
|
||||
default:
|
||||
assert(!"Unsupported capability");
|
||||
}
|
||||
break;
|
||||
|
||||
case SpvOpExtInstImport:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue