mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 10:58:03 +03:00
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:
1 parent
b0d1db9406
commit
0f70099a69
4 files changed
+19
-6
No files matched your search
@@ -2110,7 +2110,12 @@ void anv_GetPhysicalDeviceQueueFamilyProperties2(
|
|||||||
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR: {
|
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_QUERY_RESULT_STATUS_PROPERTIES_KHR: {
|
||||||
VkQueueFamilyQueryResultStatusPropertiesKHR *prop =
|
VkQueueFamilyQueryResultStatusPropertiesKHR *prop =
|
||||||
(VkQueueFamilyQueryResultStatusPropertiesKHR *)ext;
|
(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;
|
break;
|
||||||
}
|
}
|
||||||
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR: {
|
case VK_STRUCTURE_TYPE_QUEUE_FAMILY_VIDEO_PROPERTIES_KHR: {
|
||||||
|
|||||||
@@ -160,3 +160,8 @@ genX(graphics_pipeline_emit)(struct anv_graphics_pipeline *pipeline,
|
|||||||
|
|
||||||
void
|
void
|
||||||
genX(compute_pipeline_emit)(struct anv_compute_pipeline *pipeline);
|
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);
|
||||||
@@ -3700,6 +3700,9 @@ struct anv_query_pool {
|
|||||||
struct intel_perf_counter_pass *counter_pass;
|
struct intel_perf_counter_pass *counter_pass;
|
||||||
uint32_t n_passes;
|
uint32_t n_passes;
|
||||||
struct intel_perf_query_info **pass_query;
|
struct intel_perf_query_info **pass_query;
|
||||||
|
|
||||||
|
/* Video encoding queries */
|
||||||
|
VkVideoCodecOperationFlagsKHR codec;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define ANV_MB_WIDTH 16
|
#define ANV_MB_WIDTH 16
|
||||||
|
|||||||
@@ -59,8 +59,8 @@ anv_query_address(struct anv_query_pool *pool, uint32_t query)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
emit_query_mi_flush_availability(struct anv_cmd_buffer *cmd_buffer,
|
genX(emit_query_mi_flush_availability)(struct anv_cmd_buffer *cmd_buffer,
|
||||||
struct anv_address addr,
|
struct anv_address addr,
|
||||||
bool available)
|
bool available)
|
||||||
{
|
{
|
||||||
@@ -815,7 +815,7 @@ void genX(CmdResetQueryPool)(
|
|||||||
}
|
}
|
||||||
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
|
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
|
||||||
for (uint32_t i = 0; i < queryCount; i++)
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -1117,7 +1117,7 @@ void genX(CmdBeginQueryIndexedEXT)(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
UNREACHABLE("");
|
UNREACHABLE("");
|
||||||
@@ -1287,7 +1287,7 @@ void genX(CmdEndQueryIndexedEXT)(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case VK_QUERY_TYPE_RESULT_STATUS_ONLY_KHR:
|
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;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in new issue
Block a user