shader-slang / slang

Making it easier to work with shaders
MIT License
2.05k stars 177 forks source link

Disambiguate int type matrix multiply #4425

Closed jkwak-work closed 3 months ago

jkwak-work commented 3 months ago

Closes #4414

jkwak-work commented 3 months ago

I think this is because int implements both __BuiltinIntegerType and __BuiltinLogicalType at the same time.

struct int
    : __BuiltinType

#line 461 "core.meta.slang"
    ,  __BuiltinSignedArithmeticType
#line 470 "core.meta.slang"
    ,  __BuiltinArithmeticType
    ,  __BuiltinIntegerType
#line 476 "core.meta.slang"
    ,  __BuiltinLogicalType
#line 484 "core.meta.slang"
{
   ...omit...
}

I think their costs are same in this case.

csyonghe commented 3 months ago

We can probably delete that explicit inheritance line for int types, and make sure biultinIntegerType inherits from BulltinLogicalType.