nvk: Fetch debug flags from the physical device
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30033>
This commit is contained in:
committed by
Marge Bot
parent
04bdbb71de
commit
1f405ef9c6
@@ -201,7 +201,7 @@ nvk_AllocateMemory(VkDevice device,
|
||||
}
|
||||
}
|
||||
|
||||
if (dev->ws_dev->debug_flags & NVK_DEBUG_ZERO_MEMORY) {
|
||||
if (pdev->debug_flags & NVK_DEBUG_ZERO_MEMORY) {
|
||||
if (type->propertyFlags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) {
|
||||
void *map = nouveau_ws_bo_map(mem->bo, NOUVEAU_WS_BO_RDWR, NULL);
|
||||
if (map == NULL) {
|
||||
|
||||
@@ -41,6 +41,7 @@ nvk_CreateQueryPool(VkDevice device,
|
||||
VkQueryPool *pQueryPool)
|
||||
{
|
||||
VK_FROM_HANDLE(nvk_device, dev, device);
|
||||
struct nvk_physical_device *pdev = nvk_device_physical(dev);
|
||||
struct nvk_query_pool *pool;
|
||||
|
||||
pool = vk_query_pool_create(&dev->vk, pCreateInfo,
|
||||
@@ -86,7 +87,7 @@ nvk_CreateQueryPool(VkDevice device,
|
||||
return vk_error(dev, VK_ERROR_OUT_OF_DEVICE_MEMORY);
|
||||
}
|
||||
|
||||
if (dev->ws_dev->debug_flags & NVK_DEBUG_ZERO_MEMORY)
|
||||
if (pdev->debug_flags & NVK_DEBUG_ZERO_MEMORY)
|
||||
memset(pool->bo_map, 0, bo_size);
|
||||
}
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ nvk_queue_submit(struct vk_queue *vk_queue,
|
||||
{
|
||||
struct nvk_queue *queue = container_of(vk_queue, struct nvk_queue, vk);
|
||||
struct nvk_device *dev = nvk_queue_device(queue);
|
||||
struct nvk_physical_device *pdev = nvk_device_physical(dev);
|
||||
VkResult result;
|
||||
|
||||
if (vk_queue_is_lost(&queue->vk))
|
||||
@@ -265,12 +266,12 @@ nvk_queue_submit(struct vk_queue *vk_queue,
|
||||
"pointers pushbuf");
|
||||
}
|
||||
|
||||
const bool sync = dev->ws_dev->debug_flags & NVK_DEBUG_PUSH_SYNC;
|
||||
const bool sync = pdev->debug_flags & NVK_DEBUG_PUSH_SYNC;
|
||||
|
||||
result = nvk_queue_submit_drm_nouveau(queue, submit, sync);
|
||||
|
||||
if ((sync && result != VK_SUCCESS) ||
|
||||
(dev->ws_dev->debug_flags & NVK_DEBUG_PUSH_DUMP)) {
|
||||
(pdev->debug_flags & NVK_DEBUG_PUSH_DUMP)) {
|
||||
nvk_queue_state_dump_push(dev, &queue->state, stderr);
|
||||
|
||||
for (unsigned i = 0; i < submit->command_buffer_count; i++) {
|
||||
@@ -436,9 +437,9 @@ nvk_queue_submit_simple(struct nvk_queue *queue,
|
||||
result = nvk_queue_submit_simple_drm_nouveau(queue, dw_count, push_bo,
|
||||
extra_bo_count, extra_bos);
|
||||
|
||||
const bool debug_sync = dev->ws_dev->debug_flags & NVK_DEBUG_PUSH_SYNC;
|
||||
const bool debug_sync = pdev->debug_flags & NVK_DEBUG_PUSH_SYNC;
|
||||
if ((debug_sync && result != VK_SUCCESS) ||
|
||||
(dev->ws_dev->debug_flags & NVK_DEBUG_PUSH_DUMP)) {
|
||||
(pdev->debug_flags & NVK_DEBUG_PUSH_DUMP)) {
|
||||
struct nv_push push = {
|
||||
.start = (uint32_t *)dw,
|
||||
.end = (uint32_t *)dw + dw_count,
|
||||
|
||||
Reference in New Issue
Block a user