@@ -307,14 +307,15 @@ osl_texture(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
307
307
ustringhash name = ustringhash_from (name_);
308
308
bool ok = rs_texture (oec, name, (TextureSystem::TextureHandle*)handle,
309
309
#ifndef __CUDA_ARCH__
310
- sg->context ->texture_thread_info (),
310
+ sg->context ->texture_thread_info (), *opt, s, t, dsdx,
311
+ dtdx, dsdy, dtdy, 4 ,
311
312
#else
312
- nullptr ,
313
+ nullptr , *opt, s, t, dsdx, dtdx, dsdy, dtdy,
314
+ chans + (alpha ? 1 : 0 ), // # chans we're asking
313
315
#endif
314
- *opt, s, t, dsdx, dtdx, dsdy, dtdy, 4 ,
315
316
(float *)&result_simd,
316
- derivs ? (float *)&dresultds_simd : NULL ,
317
- derivs ? (float *)&dresultdt_simd : NULL ,
317
+ derivs ? (float *)&dresultds_simd : nullptr ,
318
+ derivs ? (float *)&dresultdt_simd : nullptr ,
318
319
errormessage ? &em : nullptr );
319
320
320
321
for (int i = 0 ; i < chans; ++i)
@@ -341,7 +342,7 @@ osl_texture(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
341
342
}
342
343
343
344
if (errormessage)
344
- *errormessage = ok ? ustringhash {}. hash () : em.hash ();
345
+ *errormessage = em.hash ();
345
346
return ok;
346
347
}
347
348
@@ -385,11 +386,13 @@ osl_texture3d(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
385
386
ustringhash name = ustringhash_from (name_);
386
387
bool ok = rs_texture3d (oec, name, (TextureSystem::TextureHandle*)handle,
387
388
#ifndef __CUDA_ARCH__
388
- sg->context ->texture_thread_info (),
389
+ sg->context ->texture_thread_info (), *opt, P, dPdx,
390
+ dPdy, dPdz, 4 ,
389
391
#else
390
- nullptr ,
392
+ nullptr , *opt, P, dPdx, dPdy, dPdz,
393
+ chans + (alpha ? 1 : 0 ), // # chans we're asking
391
394
#endif
392
- *opt, P, dPdx, dPdy, dPdz, 4 , (float *)&result_simd,
395
+ (float *)&result_simd,
393
396
derivs ? (float *)&dresultds_simd : nullptr ,
394
397
derivs ? (float *)&dresultdt_simd : nullptr ,
395
398
derivs ? (float *)&dresultdr_simd : nullptr ,
@@ -421,7 +424,7 @@ osl_texture3d(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
421
424
}
422
425
423
426
if (errormessage)
424
- *errormessage = ok ? ustringhash {}. hash () : em.hash ();
427
+ *errormessage = em.hash ();
425
428
return ok;
426
429
}
427
430
@@ -459,12 +462,14 @@ osl_environment(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
459
462
ustringhash name = ustringhash_from (name_);
460
463
bool ok = rs_environment (oec, name, (TextureSystem::TextureHandle*)handle,
461
464
#ifndef __CUDA_ARCH__
462
- sg->context ->texture_thread_info (),
465
+ sg->context ->texture_thread_info (), *opt, R, dRdx,
466
+ dRdy, 4 ,
463
467
#else
464
- nullptr ,
468
+ nullptr , *opt, R, dRdx, dRdy,
469
+ chans + (alpha ? 1 : 0 ), // # chans we're asking
465
470
#endif
466
- *opt, R, dRdx, dRdy, 4 , (float *)&local_result,
467
- NULL , NULL , errormessage ? &em : nullptr );
471
+ (float *)&local_result, nullptr , nullptr ,
472
+ errormessage ? &em : nullptr );
468
473
469
474
for (int i = 0 ; i < chans; ++i)
470
475
result[i] = local_result[i];
@@ -492,7 +497,7 @@ osl_environment(OpaqueExecContextPtr oec, ustringhash_pod name_, void* handle,
492
497
}
493
498
494
499
if (errormessage)
495
- *errormessage = ok ? ustringhash {}. hash () : em.hash ();
500
+ *errormessage = em.hash ();
496
501
return ok;
497
502
}
498
503
0 commit comments