Fixup MSL iOS test.

This commit is contained in:
Hans-Kristian Arntzen 2019-01-30 16:26:41 +01:00
parent 2ed171e525
commit b78ffa1cc7
3 changed files with 18 additions and 16 deletions

View File

@ -20,14 +20,8 @@ struct constant_block
#endif
constant int arraySize = SPIRV_CROSS_CONSTANT_ID_0;
vertex void main0(device storage_block* storage_0 [[buffer(0)]], device storage_block* storage_1 [[buffer(1)]], constant constant_block* constants_0 [[buffer(0)]], constant constant_block* constants_1 [[buffer(1)]], constant constant_block* constants_2 [[buffer(2)]], constant constant_block* constants_3 [[buffer(3)]], array<texture2d<int>, 3> images [[texture(0)]])
vertex void main0(constant constant_block* constants_0 [[buffer(4)]], constant constant_block* constants_1 [[buffer(5)]], constant constant_block* constants_2 [[buffer(6)]], constant constant_block* constants_3 [[buffer(7)]], device storage_block* storage_0 [[buffer(8)]], device storage_block* storage_1 [[buffer(9)]], array<texture2d<int>, 3> images [[texture(0)]])
{
device storage_block* storage[] =
{
storage_0,
storage_1,
};
constant constant_block* constants[] =
{
constants_0,
@ -36,6 +30,12 @@ vertex void main0(device storage_block* storage_0 [[buffer(0)]], device storage_
constants_3,
};
device storage_block* storage[] =
{
storage_0,
storage_1,
};
storage[0]->baz = uint4(constants[3]->foo);
storage[1]->quux = images[2].read(uint2(int2(constants[1]->bar))).xy;
}

View File

@ -20,14 +20,8 @@ struct constant_block
#endif
constant int arraySize = SPIRV_CROSS_CONSTANT_ID_0;
vertex void main0(device storage_block* storage_0 [[buffer(0)]], device storage_block* storage_1 [[buffer(1)]], constant constant_block* constants_0 [[buffer(0)]], constant constant_block* constants_1 [[buffer(1)]], constant constant_block* constants_2 [[buffer(2)]], constant constant_block* constants_3 [[buffer(3)]], array<texture2d<int>, 3> images [[texture(0)]])
vertex void main0(constant constant_block* constants_0 [[buffer(4)]], constant constant_block* constants_1 [[buffer(5)]], constant constant_block* constants_2 [[buffer(6)]], constant constant_block* constants_3 [[buffer(7)]], device storage_block* storage_0 [[buffer(8)]], device storage_block* storage_1 [[buffer(9)]], array<texture2d<int>, 3> images [[texture(0)]])
{
device storage_block* storage[] =
{
storage_0,
storage_1,
};
constant constant_block* constants[] =
{
constants_0,
@ -36,6 +30,12 @@ vertex void main0(device storage_block* storage_0 [[buffer(0)]], device storage_
constants_3,
};
device storage_block* storage[] =
{
storage_0,
storage_1,
};
storage[0]->baz = uint4(constants[3]->foo);
storage[1]->quux = images[2].read(uint2(int2(constants[1]->bar))).xy;
}

View File

@ -3,12 +3,14 @@
layout(constant_id = 0) const int arraySize = 3;
layout(binding = 0, rgba32i) uniform iimage2D images[arraySize];
uniform constant_block
layout(binding = 4) uniform constant_block
{
vec4 foo;
int bar;
} constants[4];
buffer storage_block
layout(binding = 8) buffer storage_block
{
uvec4 baz;
ivec2 quux;