nir: Allow more deref modes in phis
In particular, OpenCL needs to allow shader_temp and function_temp through because they're 100% real pointers. Fixes piglit CL calls.cl Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7092>
This commit is contained in:
committed by
Marge Bot
parent
002a23efb4
commit
181d5f59b8
@@ -179,7 +179,6 @@ program/execute/builtin/builtin-ushort-mul_hi-1.0.generated/mul_hi ushort8: fail
|
||||
program/execute/builtin/builtin-ushort-popcount-1.2.generated: skip
|
||||
program/execute/builtin/builtin-ushort-upsample-1.0.generated: crash
|
||||
program/execute/call-clobbers-amdgcn: skip
|
||||
program/execute/calls: crash
|
||||
program/execute/calls-large-struct: crash
|
||||
program/execute/calls-struct: crash
|
||||
program/execute/gegl-rgb-gamma-u8-to-ragabaf: crash
|
||||
@@ -246,9 +245,9 @@ program/execute/vstore/vstorea_half-float-private: crash
|
||||
summary:
|
||||
name: results
|
||||
---- --------
|
||||
pass: 2964
|
||||
pass: 2967
|
||||
fail: 99
|
||||
crash: 66
|
||||
crash: 65
|
||||
skip: 79
|
||||
timeout: 1
|
||||
warn: 0
|
||||
@@ -258,4 +257,4 @@ summary:
|
||||
changes: 0
|
||||
fixes: 0
|
||||
regressions: 0
|
||||
total: 3209
|
||||
total: 3211
|
||||
|
||||
@@ -513,14 +513,15 @@ validate_deref_instr(nir_deref_instr *instr, validate_state *state)
|
||||
*/
|
||||
validate_assert(state, list_is_empty(&instr->dest.ssa.if_uses));
|
||||
|
||||
/* Only certain modes can be used as sources for phi instructions. */
|
||||
/* Certain modes cannot be used as sources for phi instructions because
|
||||
* way too many passes assume that they can always chase deref chains.
|
||||
*/
|
||||
nir_foreach_use(use, &instr->dest.ssa) {
|
||||
if (use->parent_instr->type == nir_instr_type_phi) {
|
||||
validate_assert(state, instr->mode == nir_var_mem_ubo ||
|
||||
instr->mode == nir_var_mem_ssbo ||
|
||||
instr->mode == nir_var_mem_shared ||
|
||||
instr->mode == nir_var_mem_global ||
|
||||
instr->mode == nir_var_mem_constant);
|
||||
validate_assert(state, instr->mode != nir_var_shader_in &&
|
||||
instr->mode != nir_var_shader_out &&
|
||||
instr->mode != nir_var_shader_out &&
|
||||
instr->mode != nir_var_uniform);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user