radv: adjust num_records when offset>stride
If an attribute's offset is larger than the stride, the compiler will increase the vertex index and use offset%stride instead as the offset. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5007 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11642>
This commit is contained in:
@@ -5316,6 +5316,9 @@ radv_pipeline_init_vertex_input_state(struct radv_pipeline *pipeline,
|
||||
|
||||
uint32_t end = desc->offset + vk_format_get_blocksize(desc->format);
|
||||
pipeline->attrib_ends[desc->location] = end;
|
||||
if (pipeline->binding_stride[desc->binding])
|
||||
pipeline->attrib_index_offset[desc->location] =
|
||||
desc->offset / pipeline->binding_stride[desc->binding];
|
||||
pipeline->attrib_bindings[desc->location] = desc->binding;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user