diff options
author | marha <marha@users.sourceforge.net> | 2011-11-09 17:05:56 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-11-09 17:05:56 +0100 |
commit | 72d7f8d5af476f12dc75eab4fa9d59364cbec190 (patch) | |
tree | 1efac13a52811bfd28ae51538b15f87cbfaf8939 /mesalib/src/mesa/program/sampler.cpp | |
parent | a3d796bcc7de83fd88b42e09c6a82a8df4f9b836 (diff) | |
parent | a8e5f06fe01732fbd643bc435dd3b8eaa602defe (diff) | |
download | vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.gz vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.tar.bz2 vcxsrv-72d7f8d5af476f12dc75eab4fa9d59364cbec190.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mapi/glapi/glapi.h
Diffstat (limited to 'mesalib/src/mesa/program/sampler.cpp')
-rw-r--r-- | mesalib/src/mesa/program/sampler.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mesalib/src/mesa/program/sampler.cpp b/mesalib/src/mesa/program/sampler.cpp index 3b459d59c..e3641aaa9 100644 --- a/mesalib/src/mesa/program/sampler.cpp +++ b/mesalib/src/mesa/program/sampler.cpp @@ -27,6 +27,8 @@ #include "glsl_types.h" #include "ir_visitor.h" #include "../glsl/program.h" +#include "program/hash_table.h" +#include "ir_uniform.h" extern "C" { #include "main/compiler.h" @@ -110,17 +112,13 @@ _mesa_get_sampler_uniform_value(class ir_dereference *sampler, sampler->accept(&getname); - GLint index = _mesa_lookup_parameter_index(prog->Parameters, -1, - getname.name); - - if (index < 0) { + unsigned location; + if (!shader_program->UniformHash->get(location, getname.name)) { linker_error(shader_program, "failed to find sampler named %s.\n", getname.name); return 0; } - index += getname.offset; - - return prog->Parameters->ParameterValues[index][0].f; + return shader_program->UniformStorage[location].sampler + getname.offset; } } |