From 2991c0d7df898c6c3b5f5fdb66be07e63f8313e8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Thu, 5 Oct 2017 19:25:48 +0200 Subject: [PATCH] st/mesa: don't assign prog->ShadowSamplers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's not used, and the assignment for the TGSI case was incorrect for sampler arrays. Reviewed-by: Kenneth Graunke Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_glsl_to_nir.cpp | 1 - src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 ---- 2 files changed, 5 deletions(-) diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 06a8ee8c612..5a439aaf92a 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -435,7 +435,6 @@ st_nir_get_mesa_program(struct gl_context *ctx, _mesa_log("\n\n"); } - prog->ShadowSamplers = shader->shadow_samplers; prog->ExternalSamplersUsed = gl_external_samplers(prog); _mesa_update_shader_textures_used(shader_program, prog); diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 4b365c84817..1cfc9d963dc 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4475,10 +4475,6 @@ count_resources(glsl_to_tgsi_visitor *v, gl_program *prog) v->sampler_targets[idx] = st_translate_texture_target(inst->tex_target, inst->tex_shadow); - if (inst->tex_shadow) { - prog->ShadowSamplers |= 1 << (inst->resource.index + i); - } - if (inst->op == TGSI_OPCODE_TXF || inst->op == TGSI_OPCODE_TXF_LZ) { prog->TexelFetchSamplers |= 1u << idx; } -- 2.30.2