mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
r300: switch to derivative intrinsics
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Pavel Ondračka <pavel.ondracka@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30572>
This commit is contained in:
parent
772e6d61b9
commit
fd63356268
2 changed files with 11 additions and 5 deletions
|
|
@ -1193,10 +1193,6 @@ ntr_emit_alu(struct ntr_compile *c, nir_alu_instr *instr)
|
|||
[nir_op_sne] = TGSI_OPCODE_SNE,
|
||||
|
||||
[nir_op_ftrunc] = TGSI_OPCODE_TRUNC,
|
||||
[nir_op_fddx] = TGSI_OPCODE_DDX,
|
||||
[nir_op_fddy] = TGSI_OPCODE_DDY,
|
||||
[nir_op_fddx_coarse] = TGSI_OPCODE_DDX,
|
||||
[nir_op_fddy_coarse] = TGSI_OPCODE_DDY,
|
||||
[nir_op_fadd] = TGSI_OPCODE_ADD,
|
||||
[nir_op_fmul] = TGSI_OPCODE_MUL,
|
||||
|
||||
|
|
@ -1644,6 +1640,15 @@ ntr_emit_intrinsic(struct ntr_compile *c, nir_intrinsic_instr *instr)
|
|||
ntr_store(c, &instr->def, ntr_get_src(c, instr->src[0]));
|
||||
break;
|
||||
|
||||
case nir_intrinsic_ddx:
|
||||
case nir_intrinsic_ddx_coarse:
|
||||
ntr_DDX(c, ntr_get_dest(c, &instr->def), ntr_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_ddy:
|
||||
case nir_intrinsic_ddy_coarse:
|
||||
ntr_DDY(c, ntr_get_dest(c, &instr->def), ntr_get_src(c, instr->src[0]));
|
||||
return;
|
||||
|
||||
case nir_intrinsic_decl_reg:
|
||||
case nir_intrinsic_load_reg:
|
||||
case nir_intrinsic_load_reg_indirect:
|
||||
|
|
|
|||
|
|
@ -489,7 +489,8 @@ static int r300_get_video_param(struct pipe_screen *screen,
|
|||
.lower_uniforms_to_ubo = true, \
|
||||
.lower_vector_cmp = true, \
|
||||
.no_integers = true, \
|
||||
.use_interpolated_input_intrinsics = true
|
||||
.use_interpolated_input_intrinsics = true, \
|
||||
.has_ddx_intrinsics = true
|
||||
|
||||
static const nir_shader_compiler_options r500_vs_compiler_options = {
|
||||
COMMON_NIR_OPTIONS,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue