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.
This commit is contained in:
parent
2ccc81fd82
commit
84cdc3b68e
@ -18291,11 +18291,14 @@ void CompilerMSL::analyze_argument_buffers()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// After padding, retrieve the resource again. It will either be more padding, or the actual resource.
|
||||
rez_bind = get_argument_buffer_resource(desc_set, next_arg_buff_index);
|
||||
}
|
||||
|
||||
// Adjust the number of slots consumed by current member itself.
|
||||
// Use the count value from the app, instead of the shader, in case the
|
||||
// shader is only accesing part, or even one element, of the array.
|
||||
// shader is only accessing part, or even one element, of the array.
|
||||
next_arg_buff_index += rez_bind.count;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user