Fix T62481: Cycles crash rendering with UV pass after recent changes.

This commit is contained in:
Brecht Van Lommel 2019-03-12 14:03:05 +01:00
parent 298dabc79b
commit e3b1ae9a81
Notes: blender-bot 2023-02-14 07:40:56 +01:00
Referenced by issue #62481, cycles crash and say : CUDA error: Illegal address in mem_alloc_result, line 850
1 changed files with 2 additions and 3 deletions

View File

@ -219,9 +219,8 @@ ccl_device_inline float3 primitive_uv(KernelGlobals *kg, ShaderData *sd)
if(desc.offset == ATTR_STD_NOT_FOUND)
return make_float3(0.0f, 0.0f, 0.0f);
float3 uv = primitive_surface_attribute_float3(kg, sd, desc, NULL, NULL);
uv.z = 1.0f;
return uv;
float2 uv = primitive_surface_attribute_float2(kg, sd, desc, NULL, NULL);
return make_float3(uv.x, uv.y, 1.0f);
}
/* Ptex coordinates */