Fix OpenColorIO 2.0 GPU shader error in uniform assignment

And fix a (harmless) compiler warning.
This commit is contained in:
Brecht Van Lommel
2021-02-17 17:57:14 +01:00
parent a7750f95b9
commit 4d28a1d75f
2 changed files with 2 additions and 2 deletions

View File

@@ -252,7 +252,7 @@ static bool createGPUShader(OCIO_GPUShader &shader,
/* Set uniforms. */
for (OCIO_GPUUniform &uniform : textures.uniforms) {
const GpuShaderDesc::UniformData &data = uniform.data;
const char *name = name;
const char *name = uniform.name.c_str();
if (data.m_getDouble) {
GPU_shader_uniform_1f(sh, name, (float)data.m_getDouble());

View File

@@ -115,7 +115,7 @@ static struct global_gpu_state {
bool use_curve_mapping;
int curve_mapping_timestamp;
OCIO_CurveMappingSettings curve_mapping_settings;
} global_gpu_state = {NULL};
} global_gpu_state = {false};
static struct global_color_picking_state {
/* Cached processor for color picking conversion. */