summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-07-20 18:06:47 +0200
committerEric Engestrom <eric@engestrom.ch>2020-07-22 22:30:05 +0200
commitc334f84238efd80e41c8b7ad232eaa03e342c9f8 (patch)
tree85545c175fcc0af2af3e04e12b284f16c39997c0 /src
parentf9fdd9dfc1777d5676fc26d2cc3626d9b50d365b (diff)
mesa/program: fix shadow property for samplers
When creating a sampler-type, we need to pass the correct vaclue for the "is_shadow"-parameter to glsl_sampler_type(), otherwise the compiler backend will have no clue about this being a shadow-sampler. Fixes: 1c0f92d8a8c ("nir: Create sampler variables in prog_to_nir.") Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5986> (cherry picked from commit c33e8d7d522c250443d903b5732224988855b9a9)
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/prog_to_nir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
index 31ad0cb58c5..2948206ef6a 100644
--- a/src/mesa/program/prog_to_nir.c
+++ b/src/mesa/program/prog_to_nir.c
@@ -540,7 +540,7 @@ ptn_tex(struct ptn_compile *c, nir_alu_dest dest, nir_ssa_def **src,
nir_variable *var = c->sampler_vars[prog_inst->TexSrcUnit];
if (!var) {
const struct glsl_type *type =
- glsl_sampler_type(instr->sampler_dim, false, false, GLSL_TYPE_FLOAT);
+ glsl_sampler_type(instr->sampler_dim, instr->is_shadow, false, GLSL_TYPE_FLOAT);
var = nir_variable_create(b->shader, nir_var_uniform, type, "sampler");
var->data.binding = prog_inst->TexSrcUnit;
var->data.explicit_binding = true;