anv: only disable mesh when enabled at the VkDevice level

Saving ourselves some instructions since it's not going to get used.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23074>
This commit is contained in:
Lionel Landwerlin 2023-05-16 09:25:17 +03:00
parent d096a3f1a6
commit e9c1eaa535
2 changed files with 4 additions and 3 deletions

View file

@ -76,7 +76,8 @@ emit_common_so_memcpy(struct anv_batch *batch, struct anv_device *device,
/* Disable Mesh, we can't have this and streamout enabled at the same
* time.
*/
if (device->info->has_mesh_shading) {
if (device->vk.enabled_extensions.NV_mesh_shader ||
device->vk.enabled_extensions.EXT_mesh_shader) {
anv_batch_emit(batch, GENX(3DSTATE_MESH_CONTROL), mesh);
anv_batch_emit(batch, GENX(3DSTATE_TASK_CONTROL), task);
}

View file

@ -1872,8 +1872,8 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *pipeline,
#if GFX_VERx10 >= 125
const struct anv_device *device = pipeline->base.base.device;
/* Disable Mesh. */
if (device->physical->vk.supported_extensions.NV_mesh_shader ||
device->physical->vk.supported_extensions.EXT_mesh_shader) {
if (device->vk.enabled_extensions.NV_mesh_shader ||
device->vk.enabled_extensions.EXT_mesh_shader) {
struct anv_batch *batch = &pipeline->base.base.batch;
anv_batch_emit(batch, GENX(3DSTATE_MESH_CONTROL), zero);