mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 10:40:11 +01:00
nir/gather_info: Use nir_op_is_derivative
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24833>
This commit is contained in:
parent
6d3425653a
commit
d628be082b
1 changed files with 7 additions and 14 deletions
|
|
@ -835,22 +835,15 @@ gather_tex_info(nir_tex_instr *instr, nir_shader *shader)
|
|||
static void
|
||||
gather_alu_info(nir_alu_instr *instr, nir_shader *shader)
|
||||
{
|
||||
switch (instr->op) {
|
||||
case nir_op_fddx:
|
||||
case nir_op_fddy:
|
||||
shader->info.uses_fddx_fddy = true;
|
||||
FALLTHROUGH;
|
||||
case nir_op_fddx_fine:
|
||||
case nir_op_fddy_fine:
|
||||
case nir_op_fddx_coarse:
|
||||
case nir_op_fddy_coarse:
|
||||
if (shader->info.stage == MESA_SHADER_FRAGMENT)
|
||||
shader->info.fs.needs_quad_helper_invocations = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (nir_op_is_derivative(instr->op) &&
|
||||
shader->info.stage == MESA_SHADER_FRAGMENT) {
|
||||
|
||||
shader->info.fs.needs_quad_helper_invocations = true;
|
||||
}
|
||||
|
||||
if (instr->op == nir_op_fddx || instr->op == nir_op_fddy)
|
||||
shader->info.uses_fddx_fddy = true;
|
||||
|
||||
const nir_op_info *info = &nir_op_infos[instr->op];
|
||||
|
||||
for (unsigned i = 0; i < info->num_inputs; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue