mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02: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>
(cherry picked from commit feccf4121b)
This commit is contained in:
parent
c679b07111
commit
d45476c079
2 changed files with 6 additions and 1 deletions
|
|
@ -1414,7 +1414,7 @@
|
|||
"description": "lima: gpir: abort compilation if load_uniform instrinsic src isn't const",
|
||||
"nominated": false,
|
||||
"nomination_type": 3,
|
||||
"resolution": 4,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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