nir/lower_cl_images: set binding also for samplers

Fixes https://github.com/darktable-org/darktable/issues/16717 on radeonsi.

Fixes: 31ed24cec7 ("nir/lower_images: extract from clover")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29230>
(cherry picked from commit 564e569072)
This commit is contained in:
Karol Herbst 2024-05-15 23:46:43 +02:00 committed by Eric Engestrom
parent faac5b2d31
commit a18dbb4a5d
2 changed files with 2 additions and 1 deletions

View file

@ -514,7 +514,7 @@
"description": "nir/lower_cl_images: set binding also for samplers",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "31ed24cec7c63fc3906e7629edf235e333c94ffe",
"notes": null

View file

@ -161,6 +161,7 @@ nir_lower_cl_images(nir_shader *shader, bool lower_image_derefs, bool lower_samp
assert(var->data.location > last_loc);
last_loc = var->data.location;
var->data.driver_location = num_samplers++;
var->data.binding = var->data.driver_location;
} else {
/* CL shouldn't have any sampled images */
assert(!glsl_type_is_sampler(var->type));