diff options
Diffstat (limited to 'intern/cycles/kernel/geom/patch.h')
-rw-r--r-- | intern/cycles/kernel/geom/patch.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/intern/cycles/kernel/geom/patch.h b/intern/cycles/kernel/geom/patch.h index 1c63a00e30d..ec98ddf51f0 100644 --- a/intern/cycles/kernel/geom/patch.h +++ b/intern/cycles/kernel/geom/patch.h @@ -62,7 +62,7 @@ patch_map_find_patch(KernelGlobals kg, int object, int patch, float u, float v) int quadrant = patch_map_resolve_quadrant(median, &u, &v); kernel_assert(quadrant >= 0); - uint child = kernel_tex_fetch(__patches, node + quadrant); + uint child = kernel_data_fetch(patches, node + quadrant); /* is the quadrant a hole? */ if (!(child & PATCH_MAP_NODE_IS_SET)) { @@ -73,9 +73,9 @@ patch_map_find_patch(KernelGlobals kg, int object, int patch, float u, float v) uint index = child & PATCH_MAP_NODE_INDEX_MASK; if (child & PATCH_MAP_NODE_IS_LEAF) { - handle.array_index = kernel_tex_fetch(__patches, index + 0); - handle.patch_index = kernel_tex_fetch(__patches, index + 1); - handle.vert_index = kernel_tex_fetch(__patches, index + 2); + handle.array_index = kernel_data_fetch(patches, index + 0); + handle.patch_index = kernel_data_fetch(patches, index + 1); + handle.vert_index = kernel_data_fetch(patches, index + 2); return handle; } @@ -189,11 +189,11 @@ ccl_device_inline int patch_eval_indices(KernelGlobals kg, int channel, int indices[PATCH_MAX_CONTROL_VERTS]) { - int index_base = kernel_tex_fetch(__patches, handle->array_index + 2) + handle->vert_index; + int index_base = kernel_data_fetch(patches, handle->array_index + 2) + handle->vert_index; /* XXX: regular patches only */ for (int i = 0; i < 16; i++) { - indices[i] = kernel_tex_fetch(__patches, index_base + i); + indices[i] = kernel_data_fetch(patches, index_base + i); } return 16; @@ -209,7 +209,7 @@ ccl_device_inline void patch_eval_basis(KernelGlobals kg, float weights_du[PATCH_MAX_CONTROL_VERTS], float weights_dv[PATCH_MAX_CONTROL_VERTS]) { - uint patch_bits = kernel_tex_fetch(__patches, handle->patch_index + 1); /* read patch param */ + uint patch_bits = kernel_data_fetch(patches, handle->patch_index + 1); /* read patch param */ float d_scale = 1 << patch_eval_depth(patch_bits); bool non_quad_root = (patch_bits >> 4) & 0x1; @@ -287,7 +287,7 @@ ccl_device float patch_eval_float(KernelGlobals kg, *dv = 0.0f; for (int i = 0; i < num_control; i++) { - float v = kernel_tex_fetch(__attributes_float, offset + indices[i]); + float v = kernel_data_fetch(attributes_float, offset + indices[i]); val += v * weights[i]; if (du) @@ -324,7 +324,7 @@ ccl_device float2 patch_eval_float2(KernelGlobals kg, *dv = make_float2(0.0f, 0.0f); for (int i = 0; i < num_control; i++) { - float2 v = kernel_tex_fetch(__attributes_float2, offset + indices[i]); + float2 v = kernel_data_fetch(attributes_float2, offset + indices[i]); val += v * weights[i]; if (du) @@ -361,7 +361,7 @@ ccl_device float3 patch_eval_float3(KernelGlobals kg, *dv = make_float3(0.0f, 0.0f, 0.0f); for (int i = 0; i < num_control; i++) { - float3 v = kernel_tex_fetch(__attributes_float3, offset + indices[i]); + float3 v = kernel_data_fetch(attributes_float3, offset + indices[i]); val += v * weights[i]; if (du) @@ -398,7 +398,7 @@ ccl_device float4 patch_eval_float4(KernelGlobals kg, *dv = zero_float4(); for (int i = 0; i < num_control; i++) { - float4 v = kernel_tex_fetch(__attributes_float4, offset + indices[i]); + float4 v = kernel_data_fetch(attributes_float4, offset + indices[i]); val += v * weights[i]; if (du) @@ -436,7 +436,7 @@ ccl_device float4 patch_eval_uchar4(KernelGlobals kg, for (int i = 0; i < num_control; i++) { float4 v = color_srgb_to_linear_v4( - color_uchar4_to_float4(kernel_tex_fetch(__attributes_uchar4, offset + indices[i]))); + color_uchar4_to_float4(kernel_data_fetch(attributes_uchar4, offset + indices[i]))); val += v * weights[i]; if (du) |