Use types have same widths in loop condition.
In case comparisons between types of different widths in a loop condition caused the loop to behave unexpectedly.
This commit is contained in:
parent
565db34cba
commit
749be80389
@ -4951,7 +4951,7 @@ void CompilerMSL::emit_custom_functions()
|
|||||||
|
|
||||||
for (uint32_t variant = 0; variant < 12; variant++)
|
for (uint32_t variant = 0; variant < 12; variant++)
|
||||||
{
|
{
|
||||||
uint32_t dimensions = spv_func - SPVFuncImplArrayCopyMultidimBase;
|
uint8_t dimensions = spv_func - SPVFuncImplArrayCopyMultidimBase;
|
||||||
string tmp = "template<typename T";
|
string tmp = "template<typename T";
|
||||||
for (uint8_t i = 0; i < dimensions; i++)
|
for (uint8_t i = 0; i < dimensions; i++)
|
||||||
{
|
{
|
||||||
|
@ -638,7 +638,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
// An enum of SPIR-V functions that are implemented in additional
|
// An enum of SPIR-V functions that are implemented in additional
|
||||||
// source code that is added to the shader if necessary.
|
// source code that is added to the shader if necessary.
|
||||||
enum SPVFuncImpl
|
enum SPVFuncImpl : uint8_t
|
||||||
{
|
{
|
||||||
SPVFuncImplNone,
|
SPVFuncImplNone,
|
||||||
SPVFuncImplMod,
|
SPVFuncImplMod,
|
||||||
|
Loading…
Reference in New Issue
Block a user