zink: remove inlinable_uniforms_dirty_mask

this should've always just been flagging the shaders dirty directly

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11405>
This commit is contained in:
Mike Blumenkrantz 2021-05-11 12:10:05 -04:00 committed by Marge Bot
parent 78f820acd7
commit d3a63149da
3 changed files with 1 additions and 8 deletions

View File

@ -974,7 +974,7 @@ zink_set_inlinable_constants(struct pipe_context *pctx,
struct zink_context *ctx = (struct zink_context *)pctx;
memcpy(ctx->inlinable_uniforms[shader], values, num_values * 4);
ctx->inlinable_uniforms_dirty_mask |= 1 << shader;
ctx->dirty_shader_stages |= 1 << shader;
ctx->inlinable_uniforms_valid_mask |= 1 << shader;
}

View File

@ -152,7 +152,6 @@ struct zink_context {
VkDeviceSize resource_size; //the accumulated size of resources in submitted buffers
unsigned shader_has_inlinable_uniforms_mask;
unsigned inlinable_uniforms_dirty_mask;
unsigned inlinable_uniforms_valid_mask;
uint32_t inlinable_uniforms[PIPE_SHADER_TYPES][MAX_INLINABLE_UNIFORMS];

View File

@ -165,8 +165,6 @@ static void
update_compute_program(struct zink_context *ctx)
{
unsigned bits = 1 << PIPE_SHADER_COMPUTE;
ctx->dirty_shader_stages |= ctx->inlinable_uniforms_dirty_mask &
ctx->shader_has_inlinable_uniforms_mask & bits;
if (ctx->dirty_shader_stages & bits) {
struct zink_compute_program *comp = NULL;
struct hash_entry *entry = _mesa_hash_table_search(ctx->compute_program_cache,
@ -182,7 +180,6 @@ update_compute_program(struct zink_context *ctx)
}
ctx->curr_compute = comp;
ctx->dirty_shader_stages &= bits;
ctx->inlinable_uniforms_dirty_mask &= bits;
}
}
@ -199,8 +196,6 @@ update_gfx_program(struct zink_context *ctx)
ctx->last_vertex_stage_dirty = false;
}
unsigned bits = u_bit_consecutive(PIPE_SHADER_VERTEX, 5);
ctx->dirty_shader_stages |= ctx->inlinable_uniforms_dirty_mask &
ctx->shader_has_inlinable_uniforms_mask & bits;
if (ctx->dirty_shader_stages & bits) {
struct zink_gfx_program *prog = NULL;
struct hash_entry *entry = _mesa_hash_table_search(ctx->program_cache,
@ -218,7 +213,6 @@ update_gfx_program(struct zink_context *ctx)
}
ctx->curr_program = prog;
ctx->dirty_shader_stages &= ~bits;
ctx->inlinable_uniforms_dirty_mask &= ~bits;
}
}