agx: Assert vertex_id, instance_id are VS-only
We can get them in other shaders transiently due to merging shader stages, but they need to be lowered since the hardware versions only exist in the hardware VS. So the compiler should never see them outside VS. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847>
This commit is contained in:

committed by
Marge Bot

parent
4c36f9052b
commit
c363fcbe1e
@@ -1043,9 +1043,11 @@ agx_emit_intrinsic(agx_builder *b, nir_intrinsic_instr *instr)
|
||||
AGX_ICOND_UEQ);
|
||||
|
||||
case nir_intrinsic_load_vertex_id:
|
||||
assert(b->shader->stage == MESA_SHADER_VERTEX);
|
||||
return agx_mov_to(b, dst, agx_abs(agx_vertex_id(b)));
|
||||
|
||||
case nir_intrinsic_load_instance_id:
|
||||
assert(b->shader->stage == MESA_SHADER_VERTEX);
|
||||
return agx_mov_to(b, dst, agx_abs(agx_instance_id(b)));
|
||||
|
||||
case nir_intrinsic_load_preamble:
|
||||
|
Reference in New Issue
Block a user