소스 검색

st/glsl_to_nir: remove reallocation of sampler/image location

As far as I can tell this always just reassigns the same value.

Also as we don't curretly store UniformHash in the shader cache
removing this will help with adding a shader cache to gallium
nir drivers.

Reviewed-by: Rob Clark <robdclark@gmail.com>
tags/18.1-branchpoint
Timothy Arceri 7 년 전
부모
커밋
e776791432
1개의 변경된 파일0개의 추가작업 그리고 8개의 파일을 삭제
  1. 0
    8
      src/mesa/state_tracker/st_glsl_to_nir.cpp

+ 0
- 8
src/mesa/state_tracker/st_glsl_to_nir.cpp 파일 보기

@@ -242,18 +242,10 @@ st_nir_assign_uniform_locations(struct gl_program *prog,
continue;

if (uniform->type->is_sampler() || uniform->type->is_image()) {
unsigned val = 0;
bool found = shader_program->UniformHash->get(val, uniform->name);
if (uniform->type->is_sampler())
loc = shaderidx++;
else
loc = imageidx++;
assert(found);
(void) found; /* silence unused var warning */
/* this ensure that nir_lower_samplers looks at the correct
* shader_program->UniformStorage[location]:
*/
uniform->data.location = val;
} else if (strncmp(uniform->name, "gl_", 3) == 0) {
const gl_state_index *const stateTokens = (gl_state_index *)uniform->state_slots[0].tokens;
/* This state reference has already been setup by ir_to_mesa, but we'll

Loading…
취소
저장