mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 07:08:04 +02:00
brw/nir_lower_fs_load_output: optimize pixel coord
this saves a conversion or two. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40829>
This commit is contained in:
parent
1d0f42c264
commit
959ec01ac8
1 changed files with 3 additions and 2 deletions
|
|
@ -36,10 +36,11 @@ brw_nir_lower_fs_load_output_instr(nir_builder *b,
|
|||
* images.
|
||||
*/
|
||||
nir_def *size = nir_txs(b, .dim = GLSL_SAMPLER_DIM_3D, .texture_index = target);
|
||||
nir_def *pixel_coords = nir_load_pixel_coord(b);
|
||||
|
||||
nir_def *coords[3] = {
|
||||
nir_f2u32(b, nir_channel(b, nir_load_frag_coord(b), 0)),
|
||||
nir_f2u32(b, nir_channel(b, nir_load_frag_coord(b), 1)),
|
||||
nir_u2u32(b, nir_channel(b, pixel_coords, 0)),
|
||||
nir_u2u32(b, nir_channel(b, pixel_coords, 1)),
|
||||
nir_load_layer_id(b),
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue