draw: Don't look at .nir if !IR_NIR.
I suspect this double-check and comment was due to originally using ir.nir as the condition, which might be uninitialized if !IR_NIR. You could only take the branch if IR_NIR was set, and you should always not take if it !IR_NIR, so it worked out in the end, but it would cause spurious valgrind warnings if you hadn't zeroed out your TGSI shader's struct. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14896>
This commit is contained in:
@@ -94,9 +94,7 @@ draw_create_vs_llvm(struct draw_context *draw,
|
||||
if (!vs)
|
||||
return NULL;
|
||||
|
||||
/* due to some bugs in the feedback state tracker we have to check
|
||||
for ir.nir & PIPE_SHADER_IR_NIR here. */
|
||||
if (state->ir.nir && state->type == PIPE_SHADER_IR_NIR) {
|
||||
if (state->type == PIPE_SHADER_IR_NIR) {
|
||||
vs->base.state.ir.nir = state->ir.nir;
|
||||
nir_shader *nir = (nir_shader *)state->ir.nir;
|
||||
if (!nir->options->lower_uniforms_to_ubo)
|
||||
|
||||
Reference in New Issue
Block a user