diff --git a/src/liboslexec/builtindecl.h b/src/liboslexec/builtindecl.h index 250488cc4..c5124f967 100644 --- a/src/liboslexec/builtindecl.h +++ b/src/liboslexec/builtindecl.h @@ -210,7 +210,7 @@ DECL (osl_range_check, "iiiXXXiXiXX") DECL (osl_range_check_err, "iiiXXXiXiXX") DECL (osl_naninf_check, "xiXiXXiXiiX") DECL (osl_uninit_check, "xLXXXiXiXXiXiXii") -DECL (osl_get_attribute, "iXiXXiiXX") +DECL (osl_get_attribute, "iXiXXiiLX") DECL (osl_bind_interpolated_param, "iXXLiXiXiXi") DECL (osl_get_texture_options, "XX"); DECL (osl_get_noise_options, "XX"); diff --git a/src/liboslexec/llvm_gen.cpp b/src/liboslexec/llvm_gen.cpp index 3c04d76b7..71673530d 100644 --- a/src/liboslexec/llvm_gen.cpp +++ b/src/liboslexec/llvm_gen.cpp @@ -2976,7 +2976,7 @@ LLVMGEN (llvm_gen_getattribute) // We'll pass the destination's attribute type directly to the // RenderServices callback so that the renderer can perform any // necessary conversions from its internal format to OSL's. - const TypeDesc* dest_type = &Destination.typespec().simpletype(); + TypeDesc dest_type = Destination.typespec().simpletype(); llvm::Value * args[] = { rop.sg_void_ptr(), @@ -2985,7 +2985,7 @@ LLVMGEN (llvm_gen_getattribute) rop.llvm_load_value (Attribute), rop.ll.constant ((int)array_lookup), rop.llvm_load_value (Index), - rop.ll.constant_ptr ((void *) dest_type), + rop.ll.constant (dest_type), rop.llvm_void_ptr (Destination), }; llvm::Value *r = rop.ll.call_function ("osl_get_attribute", args); diff --git a/src/liboslexec/shadingsys.cpp b/src/liboslexec/shadingsys.cpp index 1094ef595..0908c6f8b 100644 --- a/src/liboslexec/shadingsys.cpp +++ b/src/liboslexec/shadingsys.cpp @@ -4189,7 +4189,7 @@ OSL_SHADEOP int osl_get_attribute(void *sg_, void *attr_name_, int array_lookup, int index, - const void *attr_type, + long long attr_type, void *attr_dest) { ShaderGlobals *sg = (ShaderGlobals *)sg_; @@ -4199,7 +4199,7 @@ OSL_SHADEOP int osl_get_attribute(void *sg_, return sg->context->osl_get_attribute (sg, sg->objdata, dest_derivs, obj_name, attr_name, array_lookup, index, - *(const TypeDesc *)attr_type, + TYPEDESC(attr_type), attr_dest); }