You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem description
It appears that we are adding the same OpCapability more than once unnecessarily.
As an example, when we call a texture sampling function, we add the required capability by calling a function, "__requireComputeDerivative()".
T Sample(vector<float, Shape.dimensions+isArray> location)
{
__requireComputeDerivative();
__target_switch
... omit the rest ...
When we call the function more than once, the emitted SPIR-V code gets more than one of the same lines.
I am putting the example below,
Problem description
It appears that we are adding the same
OpCapability
more than once unnecessarily.As an example, when we call a texture sampling function, we add the required capability by calling a function, "__requireComputeDerivative()".
When we call the function more than once, the emitted SPIR-V code gets more than one of the same lines.
I am putting the example below,
Note that the same line is added multiple times near the end.
Ideally we should avoid adding the same line more than once.
Repro step
This can be reproduced with one of existing tests that calls Sample or any equivalent.
The examples are following,
Goal
We should avoid adding the same OpCapability more than once.
The text was updated successfully, but these errors were encountered: