mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 11:10:10 +01:00
pvr: fix logic for setting vdm instance count present
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
5457e8a0e3
commit
801215d03e
1 changed files with 12 additions and 6 deletions
|
|
@ -876,16 +876,22 @@ void pvr_pack_clear_vdm_state(const struct pvr_device_info *const dev_info,
|
||||||
const uint32_t vs_output_size =
|
const uint32_t vs_output_size =
|
||||||
DIV_ROUND_UP(vs_output_size_in_bytes,
|
DIV_ROUND_UP(vs_output_size_in_bytes,
|
||||||
ROGUE_VDMCTRL_VDM_STATE4_VS_OUTPUT_SIZE_UNIT_SIZE);
|
ROGUE_VDMCTRL_VDM_STATE4_VS_OUTPUT_SIZE_UNIT_SIZE);
|
||||||
const bool needs_instance_count =
|
|
||||||
!PVR_HAS_FEATURE(dev_info, gs_rta_support) && layer_count > 1;
|
|
||||||
uint32_t *stream = state_buffer;
|
uint32_t *stream = state_buffer;
|
||||||
|
bool needs_instance_count;
|
||||||
uint32_t max_instances;
|
uint32_t max_instances;
|
||||||
uint32_t cam_size;
|
uint32_t cam_size;
|
||||||
|
|
||||||
/* The layer count should at least be 1. For vkCmdClearAttachment() the spec.
|
if (PVR_HAS_FEATURE(dev_info, gs_rta_support)) {
|
||||||
* guarantees that the layer count is not 0.
|
needs_instance_count = layer_count > 1;
|
||||||
*/
|
|
||||||
assert(layer_count != 0);
|
/* The layer count should at least be 1. For vkCmdClearAttachment() the
|
||||||
|
* spec. guarantees that the layer count is not 0.
|
||||||
|
*/
|
||||||
|
assert(layer_count);
|
||||||
|
} else {
|
||||||
|
needs_instance_count = false;
|
||||||
|
assert(layer_count == 1);
|
||||||
|
}
|
||||||
|
|
||||||
pvr_calculate_vertex_cam_size(dev_info,
|
pvr_calculate_vertex_cam_size(dev_info,
|
||||||
vs_output_size,
|
vs_output_size,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue