Cycles: fix crash rendering textured objects in OpenCL
Issue was caused by changed order of texture slots -- float textures have got lower slots indices than byte textures. OpenCL was still assuming byte textures goes before float.
This commit is contained in:
@@ -52,6 +52,12 @@ __device_inline float svm_image_texture_frac(float x, int *ix)
|
||||
|
||||
__device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y, uint srgb)
|
||||
{
|
||||
/* first slots are used by float textures, which are not supported here */
|
||||
if(id < TEX_NUM_FLOAT_IMAGES)
|
||||
return make_float4(1.0f, 0.0f, 1.0f, 1.0f);
|
||||
|
||||
id -= TEX_NUM_FLOAT_IMAGES;
|
||||
|
||||
uint4 info = kernel_tex_fetch(__tex_image_packed_info, id);
|
||||
uint width = info.x;
|
||||
uint height = info.y;
|
||||
|
Reference in New Issue
Block a user