Skip to content

Commit 84cdc3b

Browse files
billhollingsHansKristian-Work
authored andcommitted
MSL: Fix argument buffer padding.
- After padding a resource, retrieve either the next padded slot, or the next resource, in order to correctly offset the slot index.
1 parent 2ccc81f commit 84cdc3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

spirv_msl.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -18291,11 +18291,14 @@ void CompilerMSL::analyze_argument_buffers()
1829118291
default:
1829218292
break;
1829318293
}
18294+
18295+
// After padding, retrieve the resource again. It will either be more padding, or the actual resource.
18296+
rez_bind = get_argument_buffer_resource(desc_set, next_arg_buff_index);
1829418297
}
1829518298

1829618299
// Adjust the number of slots consumed by current member itself.
1829718300
// Use the count value from the app, instead of the shader, in case the
18298-
// shader is only accesing part, or even one element, of the array.
18301+
// shader is only accessing part, or even one element, of the array.
1829918302
next_arg_buff_index += rez_bind.count;
1830018303
}
1830118304

0 commit comments

Comments
 (0)