anv: fix compute engines when using ANV_QUEUE_OVERRIDE

I just noticed that my custom sparse program was not working correctly
when I used ANV_QUEUE_OVERRIDE (instead of enabling the compute queue
by default or using INTEL_ENGINE_CLASS_COMPUTE, which was removed by
commit 600d88ab3c ("intel: Remove INTEL_ENGINE_CLASS_COMPUTE and
INTEL_ENGINE_CLASS_COPY parameters").

It turns out we were not setting the same engine class type when using
ANV_QUEUE_OVERRIDE vs the other cases. Move the code around so the
behavior can stay the same.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31332>
This commit is contained in:
Paulo Zanoni
2024-08-30 10:07:09 -07:00
committed by Marge Bot
parent 75f02ed4b5
commit ab91106d4f
+5 -2
View File
@@ -2141,8 +2141,6 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
if (can_use_non_render_engines) {
c_count = pdevice->info.engine_class_supported_count[INTEL_ENGINE_CLASS_COMPUTE];
}
enum intel_engine_class compute_class =
c_count < 1 ? INTEL_ENGINE_CLASS_RENDER : INTEL_ENGINE_CLASS_COMPUTE;
int blit_count = 0;
if (pdevice->info.verx10 >= 125 && can_use_non_render_engines) {
@@ -2151,6 +2149,11 @@ anv_physical_device_init_queue_families(struct anv_physical_device *pdevice)
anv_override_engine_counts(&gc_count, &g_count, &c_count, &v_count, &blit_count);
enum intel_engine_class compute_class =
pdevice->info.engine_class_supported_count[INTEL_ENGINE_CLASS_COMPUTE] &&
c_count >= 1 ? INTEL_ENGINE_CLASS_COMPUTE :
INTEL_ENGINE_CLASS_RENDER;
if (gc_count > 0) {
pdevice->queue.families[family_count++] = (struct anv_queue_family) {
.queueFlags = VK_QUEUE_GRAPHICS_BIT |