glsl/standalone: Fix up _mesa_reference_shader_program_data signature
Drop the unused ctx parameter, to match the main Mesa code.
Fixes ODR violation flagged by -Wodr with LTO enabled:
../src/mesa/main/shaderobj.h:74:1: error: ‘_mesa_reference_shader_program_data’ violates the C++ One Definition Rule [-Werror=odr]
74 | _mesa_reference_shader_program_data(struct gl_shader_program_data **ptr,
| ^
../src/compiler/glsl/standalone_scaffolding.cpp:76:1: note: type mismatch in parameter 1
76 | _mesa_reference_shader_program_data(struct gl_context *ctx,
| ^
../src/compiler/glsl/standalone_scaffolding.cpp:76:1: note: ‘_mesa_reference_shader_program_data’ was previously declared here
../src/compiler/glsl/standalone_scaffolding.cpp:76:1: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
Fixes: 717a720e9c ("mesa: drop unused context parameter to shader program data reference.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21215>
This commit is contained in:
@@ -73,11 +73,9 @@ _mesa_problem(struct gl_context *ctx, const char *fmt, ...)
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
(void) ctx;
|
||||
*ptr = data;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,8 +41,7 @@ extern "C" void
|
||||
_mesa_problem(struct gl_context *ctx, const char *fmtString, ... );
|
||||
|
||||
extern "C" 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);
|
||||
|
||||
extern "C" void
|
||||
|
||||
Reference in New Issue
Block a user