GPU: Fix Adresse Sanitizer errors
This commit is contained in:
@@ -627,7 +627,8 @@ struct ShaderCreateInfo {
|
||||
Resource res(Resource::BindType::SAMPLER, slot);
|
||||
res.sampler.type = type;
|
||||
res.sampler.name = name;
|
||||
res.sampler.sampler = sampler;
|
||||
/* Produces asan errors for the moment. */
|
||||
// res.sampler.sampler = sampler;
|
||||
((freq == Frequency::PASS) ? pass_resources_ : batch_resources_).append(res);
|
||||
interface_names_size_ += name.size() + 1;
|
||||
return *(Self *)this;
|
||||
|
@@ -93,17 +93,15 @@ static int node_shader_gpu_volume_principled(GPUMaterial *mat,
|
||||
}
|
||||
|
||||
/* Default values if attributes not found. */
|
||||
static float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
if (!density) {
|
||||
static float one = 1.0f;
|
||||
density = GPU_constant(&one);
|
||||
density = GPU_constant(white);
|
||||
}
|
||||
if (!color) {
|
||||
static float white[4] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
color = GPU_constant(white);
|
||||
}
|
||||
if (!temperature) {
|
||||
static float one = 1.0f;
|
||||
temperature = GPU_constant(&one);
|
||||
temperature = GPU_constant(white);
|
||||
}
|
||||
|
||||
/* Create blackbody spectrum. */
|
||||
|
Reference in New Issue
Block a user