mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 04:00:10 +01:00
pco: remap buffer samplers to be 2d
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
b83481e397
commit
a3b2510c24
1 changed files with 7 additions and 1 deletions
|
|
@ -1056,7 +1056,13 @@ static nir_def *lower_image(nir_builder *b, nir_instr *instr, void *cb_data)
|
|||
if (coords)
|
||||
coords = nir_trim_vector(b, coords, num_coord_comps);
|
||||
|
||||
if (ia) {
|
||||
/* Special case, override buffers to be 2D. */
|
||||
if (image_dim == GLSL_SAMPLER_DIM_BUF) {
|
||||
image_dim = GLSL_SAMPLER_DIM_2D;
|
||||
coords = nir_vec2(b,
|
||||
nir_umod_imm(b, coords, 8192),
|
||||
nir_udiv_imm(b, coords, 8192));
|
||||
} else if (ia) {
|
||||
nir_variable *pos = nir_get_variable_with_location(b->shader,
|
||||
nir_var_shader_in,
|
||||
VARYING_SLOT_POS,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue