mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
ac/nir,radeonsi: use load_cull_line_viewport_xy_scale_and_offset_amd
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31865>
This commit is contained in:
parent
0f39d44f1b
commit
4f096b994d
2 changed files with 7 additions and 4 deletions
|
|
@ -248,7 +248,7 @@ cull_small_primitive_line(nir_builder *b, nir_def *pos[3][4],
|
|||
* It should contain no holes if this matches hw behavior.
|
||||
*/
|
||||
nir_def *v0[2], *v1[2];
|
||||
nir_def *vp = nir_load_cull_triangle_viewport_xy_scale_and_offset_amd(b);
|
||||
nir_def *vp = nir_load_cull_line_viewport_xy_scale_and_offset_amd(b);
|
||||
|
||||
/* Get vertex positions in pixels. */
|
||||
for (unsigned chan = 0; chan < 2; chan++) {
|
||||
|
|
|
|||
|
|
@ -384,10 +384,13 @@ static bool lower_intrinsic(nir_builder *b, nir_instr *instr, struct lower_abi_s
|
|||
break;
|
||||
}
|
||||
case nir_intrinsic_load_cull_triangle_viewport_xy_scale_and_offset_amd: {
|
||||
bool prim_is_lines = key->ge.opt.ngg_culling & SI_NGG_CULL_LINES;
|
||||
nir_def *addr = ac_nir_load_arg(b, &args->ac, args->small_prim_cull_info);
|
||||
unsigned offset = prim_is_lines ? 16 : 0;
|
||||
replacement = nir_load_smem_amd(b, 4, addr, nir_imm_int(b, offset));
|
||||
replacement = nir_load_smem_amd(b, 4, addr, nir_imm_int(b, 0));
|
||||
break;
|
||||
}
|
||||
case nir_intrinsic_load_cull_line_viewport_xy_scale_and_offset_amd: {
|
||||
nir_def *addr = ac_nir_load_arg(b, &args->ac, args->small_prim_cull_info);
|
||||
replacement = nir_load_smem_amd(b, 4, addr, nir_imm_int(b, 16));
|
||||
break;
|
||||
}
|
||||
case nir_intrinsic_load_num_vertices_per_primitive_amd:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue