mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 04:08:10 +02:00
d3d12: use nir_op_ffma_weak
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41165>
This commit is contained in:
parent
9bbb92a7cb
commit
1d359cc677
2 changed files with 10 additions and 10 deletions
|
|
@ -180,14 +180,14 @@ lower_emit_vertex(nir_intrinsic_instr *instr, nir_builder *b, struct lower_state
|
|||
/* pos = scaled_point_size * point_dir + point_pos */
|
||||
nir_def *point_dir = get_point_dir(b, state, i);
|
||||
nir_def *pos = nir_vec4(b,
|
||||
nir_ffma_old(b,
|
||||
point_width,
|
||||
nir_channel(b, point_dir, 0),
|
||||
nir_channel(b, state->point_pos, 0)),
|
||||
nir_ffma_old(b,
|
||||
point_height,
|
||||
nir_channel(b, point_dir, 1),
|
||||
nir_channel(b, state->point_pos, 1)),
|
||||
nir_ffma_weak(b,
|
||||
point_width,
|
||||
nir_channel(b, point_dir, 0),
|
||||
nir_channel(b, state->point_pos, 0)),
|
||||
nir_ffma_weak(b,
|
||||
point_height,
|
||||
nir_channel(b, point_dir, 1),
|
||||
nir_channel(b, state->point_pos, 1)),
|
||||
nir_channel(b, state->point_pos, 2),
|
||||
nir_channel(b, state->point_pos, 3));
|
||||
nir_store_var(b, state->pos_out, pos, 0xf);
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ lower_pos_read(nir_builder *b, struct nir_intrinsic_instr *intr, void *_var)
|
|||
"d3d12_DepthTransform",
|
||||
glsl_vec_type(2),
|
||||
depth_transform_var);
|
||||
depth = nir_fmad_old(b, depth, nir_channel(b, depth_transform, 0),
|
||||
nir_channel(b, depth_transform, 1));
|
||||
depth = nir_ffma_weak(b, depth, nir_channel(b, depth_transform, 0),
|
||||
nir_channel(b, depth_transform, 1));
|
||||
|
||||
pos = nir_vector_insert_imm(b, pos, depth, 2);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue