mirror of https://git.suyu.dev/suyu/suyu
feat(shader): implement geometry shader invocation info
- Update EmitInvocationInfo in SPIRV backend to handle geometry shader stage
ref: 1266fad681 (diff-4cbf73a98ed4ad649a4a6f38b569bc31fcf68cf7)
This commit is contained in:
parent
56f062ac4d
commit
154aab7c4b
|
@ -547,10 +547,9 @@ Id EmitInvocationInfo(EmitContext& ctx) {
|
|||
switch (ctx.stage) {
|
||||
case Stage::TessellationControl:
|
||||
case Stage::TessellationEval:
|
||||
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in),
|
||||
ctx.Const(16u));
|
||||
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.OpLoad(ctx.U32[1], ctx.patch_vertices_in), ctx.Const(16u));
|
||||
case Stage::Geometry:
|
||||
return ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology) << 16);
|
||||
return ctx.OpShiftLeftLogical(ctx.U32[1], ctx.Const(InputTopologyVertices::vertices(ctx.runtime_info.input_topology)), ctx.Const(16u));
|
||||
default:
|
||||
LOG_WARNING(Shader, "(STUBBED) called");
|
||||
return ctx.Const(0x00ff0000u);
|
||||
|
|
Loading…
Reference in New Issue