diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-20 11:29:58 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-05-20 11:29:58 -0600 |
commit | c95c4efa54175f0adcffacb71e3d66839617ceba (patch) | |
tree | b3f7b18b34e8d8937e103b36e22a9017ac33e6ad /src/mesa/shader/slang/slang_codegen.c | |
parent | 655374bda7dc7ae6fc1a0ef64ab868e3c8be9aa0 (diff) |
fix incorrect sampler numbering/indexing.
All samplers indexes were zero.
cherry-picked from master (b6fb0940c226373ac235a5d327d3fcfd742bc6b9)
Diffstat (limited to 'src/mesa/shader/slang/slang_codegen.c')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 8e4c10ff43..d19d5a0abb 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -2841,8 +2841,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var, * store->Index = sampler number (0..7, typically) * store->Size = texture type index (1D, 2D, 3D, cube, etc) */ - const GLint sampNum = A->numSamplers++; - _mesa_add_sampler(prog->Parameters, varName, datatype, sampNum); + GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype); store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex); if (dbg) printf("SAMPLER "); } |