소스 검색

st/glsl_to_nir: remove dead io after conversion to nir

This fixes an assert in nir_lower_var_copies() for some bioshock
shaders where an unused clipdistance array has no size.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
tags/18.1-branchpoint
Timothy Arceri 7 년 전
부모
커밋
2b4afaef1c
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      src/mesa/state_tracker/st_glsl_to_nir.cpp

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

@@ -319,6 +319,10 @@ st_glsl_to_nir(struct st_context *st, struct gl_program *prog,

nir_shader *nir = glsl_to_nir(shader_program, stage, options);

nir_variable_mode mask =
(nir_variable_mode) (nir_var_shader_in | nir_var_shader_out);
nir_remove_dead_variables(nir, mask);

st_nir_opts(nir);

return nir;

Loading…
취소
저장