mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 11:08:03 +02:00
turnip: set load_layer_id to zero
We don't have layered rendering and ir3 doesn't support this intrinsic, so just set it to zero for now. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
7bbcf7deff
commit
99a4f7c79f
1 changed files with 8 additions and 0 deletions
|
|
@ -225,6 +225,14 @@ static bool
|
||||||
lower_intrinsic(nir_builder *b, nir_intrinsic_instr *instr,
|
lower_intrinsic(nir_builder *b, nir_intrinsic_instr *instr,
|
||||||
struct tu_shader *shader)
|
struct tu_shader *shader)
|
||||||
{
|
{
|
||||||
|
/* TODO: remove this when layered rendering is implemented */
|
||||||
|
if (instr->intrinsic == nir_intrinsic_load_layer_id) {
|
||||||
|
nir_ssa_def_rewrite_uses(&instr->dest.ssa,
|
||||||
|
nir_src_for_ssa(nir_imm_int(b, 0)));
|
||||||
|
nir_instr_remove(&instr->instr);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (instr->intrinsic == nir_intrinsic_load_push_constant) {
|
if (instr->intrinsic == nir_intrinsic_load_push_constant) {
|
||||||
/* note: ir3 wants load_ubo, not load_uniform */
|
/* note: ir3 wants load_ubo, not load_uniform */
|
||||||
assert(nir_intrinsic_base(instr) == 0);
|
assert(nir_intrinsic_base(instr) == 0);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue