mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 02:40:39 +01:00
lima: gpir: abort compilation if load_uniform instrinsic src isn't const
GP supports indirect indexing of uniforms, but it's never been implemented in GPIR, so just abort compilation instead of crashing an app with assertion failure. Backport-to: 23.3 Backport-to: 24.0 Reviewed-by: Erico Nunes <nunes.erico@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24855>
This commit is contained in:
parent
6998c48f77
commit
feccf4121b
1 changed files with 5 additions and 0 deletions
|
|
@ -253,6 +253,11 @@ static bool gpir_emit_intrinsic(gpir_block *block, nir_instr *ni)
|
|||
case nir_intrinsic_load_uniform:
|
||||
{
|
||||
int offset = nir_intrinsic_base(instr);
|
||||
|
||||
if (!nir_src_is_const(instr->src[0])) {
|
||||
gpir_error("indirect indexing for uniforms is not implemented\n");
|
||||
return false;
|
||||
}
|
||||
offset += (int)nir_src_as_float(instr->src[0]);
|
||||
|
||||
return gpir_create_load(block, &instr->def,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue