hasvk: Reject result status queries on the video decode queue.

Inline queries enabled by video_maintenance1 would just lock up my
machine and I'm not sure a proper workaround exists.

A few nits while here.

Assisted-by: Claude
This commit is contained in:
dancingmirrors authored and elwrcl committed 2026-07-21 22:25:23 +03:00
1 parent b0d1db9406
commit 0f70099a69
4 files changed
+19 -6

No files matched your search

+6 -1
View File
@@ -2110,7 +2110,12 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR: {
VkQueueFamilyQueryResultStatusPropertiesKHR *prop =
(VkQueueFamilyQueryResultStatusPropertiesKHR *)ext;
prop->queryResultStatusSupport = VK_TRUE;
/* Result status queries require the queue's command streamer
* to write the query result to memory. The VCS seemingly
* cannot do a posted memory write. */
prop->queryResultStatusSupport =
(queue_family->queueFlags & VK_QUEUE_VIDEO_DECODE_BIT_KHR) ?
VK_FALSE : VK_TRUE;
break;
}
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR: {
+5
View File
@@ -160,3 +160,8 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *pipeline,
void
genX(compute_pipeline_emit)(struct anv_compute_pipeline *pipeline);
void
genX(emit_query_mi_flush_availability)(struct anv_cmd_buffer *cmd_buffer,
struct anv_address addr,
bool available);
+3
View File
@@ -3700,6 +3700,9 @@ struct anv_query_pool {
struct intel_perf_counter_pass *counter_pass;
uint32_t n_passes;
struct intel_perf_query_info **pass_query;
/* Video encoding queries */
VkVideoCodecOperationFlagsKHR codec;
};
#define ANV_MB_WIDTH 16
+5 -5
View File
@@ -59,8 +59,8 @@ anv_query_address(struct anv_query_pool *pool, uint32_t query)
};
}
static void
emit_query_mi_flush_availability(struct anv_cmd_buffer *cmd_buffer,
void
genX(emit_query_mi_flush_availability)(struct anv_cmd_buffer *cmd_buffer,
struct anv_address addr,
bool available)
{
@@ -815,7 +815,7 @@ void genX(CmdResetQueryPool)(
}
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
for (uint32_t i = 0; i < queryCount; i++)
emit_query_mi_flush_availability(cmd_buffer, anv_query_address(pool, firstQuery + i), false);
genX(emit_query_mi_flush_availability)(cmd_buffer, anv_query_address(pool, firstQuery + i), false);
break;
default:
@@ -1117,7 +1117,7 @@ void genX(CmdBeginQueryIndexedEXT)(
break;
}
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
emit_query_mi_flush_availability(cmd_buffer, query_addr, false);
genX(emit_query_mi_flush_availability)(cmd_buffer, query_addr, false);
break;
default:
UNREACHABLE("");
@@ -1287,7 +1287,7 @@ void genX(CmdEndQueryIndexedEXT)(
break;
}
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
emit_query_mi_flush_availability(cmd_buffer, query_addr, true);
genX(emit_query_mi_flush_availability)(cmd_buffer, query_addr, true);
break;
default: