Skip to content

Commit 52a86e2

Browse files
committed
Change batched to use ustringhash_pod instead of ustring_pod (2).
Signed-off-by: Tuomas Tonteri <[email protected]>
1 parent be092fc commit 52a86e2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/liboslexec/wide/wide_opcolor.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ __OSL_MASKED_OP2(prepend_color_from, Wv, Ws)(void* bsg_, void* c_, void* from_,
281281
const ColorSystem& cs = cs_from_bsg(bsg_);
282282
ShadingContext* ctx = context_from_bsg(bsg_);
283283

284-
Wide<const ustring> wFrom(from_);
284+
Wide<const ustringhash> wFrom(from_);
285285
foreach_unique(wFrom, Mask(mask_value),
286-
[=, &cs](const ustring& from, Mask from_mask) {
286+
[=, &cs](const ustringhash& from, Mask from_mask) {
287287
// Reuse the uniform from implementation by restricting results to
288288
// just the lanes with the same value of "from".
289289
Masked<Color3> wsub_result(c_, from_mask);
@@ -305,14 +305,14 @@ namespace {
305305

306306
template<typename COLOR>
307307
OSL_NOINLINE void
308-
wide_transformc(const ColorSystem cs, ustring fromspace, ustring tospace,
308+
wide_transformc(const ColorSystem cs, ustringhash fromspace, ustringhash tospace,
309309
Masked<COLOR> wOutput, Wide<const COLOR> wInput,
310310
ShadingContext* context);
311311

312312
// NOTE: keep implementation as mirror of ColorSystem::transformc
313313
template<typename COLOR>
314314
void
315-
wide_transformc(const ColorSystem cs, ustring fromspace, ustring tospace,
315+
wide_transformc(const ColorSystem cs, ustringhash fromspace, ustringhash tospace,
316316
Masked<COLOR> wOutput, Wide<const COLOR> wInput,
317317
ShadingContext* context)
318318
{
@@ -479,8 +479,8 @@ __OSL_MASKED_OP3(transform_color, Wv, s,
479479
const ColorSystem& cs = cs_from_bsg(bsg_);
480480
ShadingContext* ctx = context_from_bsg(bsg_);
481481

482-
ustring from = ustring_from(from_);
483-
ustring to = ustring_from(to_);
482+
ustringhash from = ustringhash_from(from_);
483+
ustringhash to = ustringhash_from(to_);
484484

485485
if (Cout_derivs) {
486486
if (Cin_derivs) {
@@ -517,8 +517,8 @@ __OSL_OP3(transform_color, v, s, s)(void* bsg_, void* Cin, int Cin_derivs,
517517
const ColorSystem& cs = cs_from_bsg(bsg_);
518518
ShadingContext* ctx = context_from_bsg(bsg_);
519519

520-
ustring from = ustring_from(from_);
521-
ustring to = ustring_from(to_);
520+
ustringhash from = ustringhash_from(from_);
521+
ustringhash to = ustringhash_from(to_);
522522

523523
if (Cout_derivs) {
524524
if (Cin_derivs) {

0 commit comments

Comments
 (0)