[Mesa-dev] [PATCH 05/12] nir: Remove linker_error calls from nir_lower_samplers().

Kenneth Graunke kenneth at whitecape.org
Wed Apr 8 00:06:28 PDT 2015


These should never happen.  Plus, NIR passes really shouldn't be
reporting linker errors - this is past link time.

Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/glsl/nir/nir_lower_samplers.cpp | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/glsl/nir/nir_lower_samplers.cpp b/src/glsl/nir/nir_lower_samplers.cpp
index 7a7cf85..90e023a 100644
--- a/src/glsl/nir/nir_lower_samplers.cpp
+++ b/src/glsl/nir/nir_lower_samplers.cpp
@@ -41,17 +41,12 @@ get_sampler_index(struct gl_shader_program *shader_program,
 {
    unsigned location;
    if (!shader_program->UniformHash->get(location, name)) {
-      linker_error(shader_program,
-                   "failed to find sampler named %s.\n", name);
+      assert(!"failed to find sampler");
       return 0;
    }
 
    if (!shader_program->UniformStorage[location].sampler[stage].active) {
-      assert(0 && "cannot return a sampler");
-      linker_error(shader_program,
-                   "cannot return a sampler named %s, because it is not "
-                   "used in this shader stage. This is a driver bug.\n",
-                   name);
+      assert(!"cannot return a sampler");
       return 0;
    }
 
-- 
2.3.5



More information about the mesa-dev mailing list