diff --git a/src/panfrost/vulkan/panvk_device.c b/src/panfrost/vulkan/panvk_device.c index 2b81aab1147..31d5ba85aa8 100644 --- a/src/panfrost/vulkan/panvk_device.c +++ b/src/panfrost/vulkan/panvk_device.c @@ -28,6 +28,8 @@ #include "panvk_private.h" +#include "decode.h" + #include "pan_bo.h" #include "pan_encoder.h" #include "pan_util.h" @@ -967,6 +969,8 @@ panvk_CreateDevice(VkPhysicalDevice physicalDevice, } } + device->debug.decode_ctx = device->pdev.decode_ctx; + *pDevice = panvk_device_to_handle(device); return VK_SUCCESS; diff --git a/src/panfrost/vulkan/panvk_private.h b/src/panfrost/vulkan/panvk_private.h index 4ab1f91c55c..bb696188c45 100644 --- a/src/panfrost/vulkan/panvk_private.h +++ b/src/panfrost/vulkan/panvk_private.h @@ -261,6 +261,11 @@ struct panvk_device { int queue_count[PANVK_MAX_QUEUE_FAMILIES]; struct panvk_physical_device *physical_device; + + struct { + struct pandecode_context *decode_ctx; + } debug; + int _lost; }; diff --git a/src/panfrost/vulkan/panvk_vX_device.c b/src/panfrost/vulkan/panvk_vX_device.c index d340d05dccd..5db2a40ae15 100644 --- a/src/panfrost/vulkan/panvk_vX_device.c +++ b/src/panfrost/vulkan/panvk_vX_device.c @@ -42,7 +42,6 @@ panvk_queue_submit_batch(struct panvk_queue *queue, struct panvk_batch *batch, { const struct panvk_device *dev = queue->device; unsigned debug = dev->physical_device->instance->debug_flags; - const struct panfrost_device *pdev = &dev->pdev; int ret; /* Reset the batch if it's already been issued */ @@ -77,12 +76,12 @@ panvk_queue_submit_batch(struct panvk_queue *queue, struct panvk_batch *batch, } if (debug & PANVK_DEBUG_TRACE) { - pandecode_jc(pdev->decode_ctx, batch->jc.first_job, + pandecode_jc(dev->debug.decode_ctx, batch->jc.first_job, dev->physical_device->kmod.props.gpu_prod_id); } if (debug & PANVK_DEBUG_DUMP) - pandecode_dump_mappings(pdev->decode_ctx); + pandecode_dump_mappings(dev->debug.decode_ctx); } if (batch->fragment_job) { @@ -111,15 +110,15 @@ panvk_queue_submit_batch(struct panvk_queue *queue, struct panvk_batch *batch, } if (debug & PANVK_DEBUG_TRACE) - pandecode_jc(pdev->decode_ctx, batch->fragment_job, + pandecode_jc(dev->debug.decode_ctx, batch->fragment_job, dev->physical_device->kmod.props.gpu_prod_id); if (debug & PANVK_DEBUG_DUMP) - pandecode_dump_mappings(pdev->decode_ctx); + pandecode_dump_mappings(dev->debug.decode_ctx); } if (debug & PANVK_DEBUG_TRACE) - pandecode_next_frame(pdev->decode_ctx); + pandecode_next_frame(dev->debug.decode_ctx); batch->issued = true; }