mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
anv: move empty_vs_input to physical device
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29057>
This commit is contained in:
parent
725397759a
commit
610a7c84c3
3 changed files with 17 additions and 16 deletions
|
|
@ -1250,6 +1250,12 @@ struct anv_physical_device {
|
|||
|
||||
/* Value of PIPELINE_SELECT::PipelineSelection == GPGPU */
|
||||
uint32_t gpgpu_pipeline_value;
|
||||
|
||||
/** A pre packed VERTEX_ELEMENT_STATE feeding 0s to the VS stage
|
||||
*
|
||||
* For use when a pipeline has no VS input
|
||||
*/
|
||||
uint32_t empty_vs_input[2];
|
||||
};
|
||||
|
||||
static inline uint32_t
|
||||
|
|
@ -1910,12 +1916,6 @@ struct anv_device {
|
|||
struct anv_bo *btd_fifo_bo;
|
||||
struct anv_address rt_uuid_addr;
|
||||
|
||||
/** A pre packed VERTEX_ELEMENT_STATE feeding 0s to the VS stage
|
||||
*
|
||||
* For use when a pipeline has no VS input
|
||||
*/
|
||||
uint32_t empty_vs_input[2];
|
||||
|
||||
bool robust_buffer_access;
|
||||
|
||||
uint32_t protected_session_id;
|
||||
|
|
|
|||
|
|
@ -1874,8 +1874,8 @@ cmd_buffer_gfx_state_emission(struct anv_cmd_buffer *cmd_buffer)
|
|||
|
||||
if (p) {
|
||||
if (ve_count == 0) {
|
||||
memcpy(p + 1, cmd_buffer->device->empty_vs_input,
|
||||
sizeof(cmd_buffer->device->empty_vs_input));
|
||||
memcpy(p + 1, cmd_buffer->device->physical->empty_vs_input,
|
||||
sizeof(cmd_buffer->device->physical->empty_vs_input));
|
||||
} else if (ve_count == pipeline->vertex_input_elems) {
|
||||
/* MESA_VK_DYNAMIC_VI is not dynamic for this pipeline, so
|
||||
* everything is in pipeline->vertex_input_data and we can just
|
||||
|
|
|
|||
|
|
@ -347,14 +347,6 @@ init_render_queue_state(struct anv_queue *queue, bool is_companion_rcs_batch)
|
|||
.end = (void *) cmds + sizeof(cmds),
|
||||
};
|
||||
|
||||
struct GENX(VERTEX_ELEMENT_STATE) empty_ve = {
|
||||
.Valid = true,
|
||||
.Component0Control = VFCOMP_STORE_0,
|
||||
.Component1Control = VFCOMP_STORE_0,
|
||||
.Component2Control = VFCOMP_STORE_0,
|
||||
.Component3Control = VFCOMP_STORE_0,
|
||||
};
|
||||
GENX(VERTEX_ELEMENT_STATE_pack)(NULL, device->empty_vs_input, &empty_ve);
|
||||
|
||||
genX(emit_pipeline_select)(&batch, _3D, device);
|
||||
|
||||
|
|
@ -778,6 +770,15 @@ genX(init_physical_device_state)(ASSERTED struct anv_physical_device *pdevice)
|
|||
pdevice->cmd_emit_timestamp = genX(cmd_emit_timestamp);
|
||||
|
||||
pdevice->gpgpu_pipeline_value = GPGPU;
|
||||
|
||||
struct GENX(VERTEX_ELEMENT_STATE) empty_ve = {
|
||||
.Valid = true,
|
||||
.Component0Control = VFCOMP_STORE_0,
|
||||
.Component1Control = VFCOMP_STORE_0,
|
||||
.Component2Control = VFCOMP_STORE_0,
|
||||
.Component3Control = VFCOMP_STORE_0,
|
||||
};
|
||||
GENX(VERTEX_ELEMENT_STATE_pack)(NULL, pdevice->empty_vs_input, &empty_ve);
|
||||
}
|
||||
|
||||
VkResult
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue