mesa: drop unused context parameter to shader program data reference.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14437>
This commit is contained in:
@@ -2521,7 +2521,7 @@ link_intrastage_shaders(void *mem_ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
_mesa_reference_shader_program_data(ctx, &gl_prog->sh.data, prog->data);
|
||||
_mesa_reference_shader_program_data(&gl_prog->sh.data, prog->data);
|
||||
|
||||
/* Don't use _mesa_reference_program() just take ownership */
|
||||
linked->Program = gl_prog;
|
||||
|
@@ -1244,7 +1244,7 @@ create_linked_shader_and_program(struct gl_context *ctx,
|
||||
blob_copy_bytes(metadata, ((uint8_t *) &glprog->info) + s_info_ptrs,
|
||||
s_info_size - s_info_ptrs);
|
||||
|
||||
_mesa_reference_shader_program_data(ctx, &glprog->sh.data, prog->data);
|
||||
_mesa_reference_shader_program_data(&glprog->sh.data, prog->data);
|
||||
_mesa_reference_program(ctx, &linked->Program, glprog);
|
||||
prog->_LinkedShaders[stage] = linked;
|
||||
}
|
||||
|
@@ -158,8 +158,7 @@ _mesa_spirv_link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
return;
|
||||
}
|
||||
|
||||
_mesa_reference_shader_program_data(ctx,
|
||||
&gl_prog->sh.data,
|
||||
_mesa_reference_shader_program_data(&gl_prog->sh.data,
|
||||
prog->data);
|
||||
|
||||
/* Don't use _mesa_reference_program() just take ownership */
|
||||
|
@@ -205,8 +205,7 @@ _mesa_lookup_shader_err(struct gl_context *ctx, GLuint name, const char *caller)
|
||||
/**********************************************************************/
|
||||
|
||||
void
|
||||
_mesa_reference_shader_program_data(struct gl_context *ctx,
|
||||
struct gl_shader_program_data **ptr,
|
||||
_mesa_reference_shader_program_data(struct gl_shader_program_data **ptr,
|
||||
struct gl_shader_program_data *data)
|
||||
{
|
||||
if (*ptr == data)
|
||||
@@ -218,7 +217,6 @@ _mesa_reference_shader_program_data(struct gl_context *ctx,
|
||||
assert(oldData->RefCount > 0);
|
||||
|
||||
if (p_atomic_dec_zero(&oldData->RefCount)) {
|
||||
assert(ctx);
|
||||
assert(oldData->NumUniformStorage == 0 ||
|
||||
oldData->UniformStorage);
|
||||
|
||||
@@ -357,7 +355,7 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
|
||||
if (shProg->data)
|
||||
_mesa_program_resource_hash_destroy(shProg);
|
||||
|
||||
_mesa_reference_shader_program_data(ctx, &shProg->data, NULL);
|
||||
_mesa_reference_shader_program_data(&shProg->data, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -71,8 +71,7 @@ _mesa_reference_shader_program_(struct gl_context *ctx,
|
||||
struct gl_shader_program *shProg);
|
||||
|
||||
void
|
||||
_mesa_reference_shader_program_data(struct gl_context *ctx,
|
||||
struct gl_shader_program_data **ptr,
|
||||
_mesa_reference_shader_program_data(struct gl_shader_program_data **ptr,
|
||||
struct gl_shader_program_data *data);
|
||||
|
||||
static inline void
|
||||
|
@@ -301,7 +301,7 @@ _mesa_reference_program_(struct gl_context *ctx,
|
||||
|
||||
if (p_atomic_dec_zero(&oldProg->RefCount)) {
|
||||
assert(ctx);
|
||||
_mesa_reference_shader_program_data(ctx, &oldProg->sh.data, NULL);
|
||||
_mesa_reference_shader_program_data(&oldProg->sh.data, NULL);
|
||||
st_delete_program(ctx, oldProg);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user