the SF program)
``soft64``
enable implementation of software 64bit floating point support
+ ``sparse``
+ dump usage of sparse resources
``spill_fs``
force spilling of all registers in the scalar backend (useful to
debug spilling code)
{ "swsb-stall", DEBUG_SWSB_STALL },
{ "heaps", DEBUG_HEAPS },
{ "isl", DEBUG_ISL },
+ { "sparse", DEBUG_SPARSE },
{ NULL, 0 }
};
#define DEBUG_SWSB_STALL (1ull << 45)
#define DEBUG_HEAPS (1ull << 46)
#define DEBUG_ISL (1ull << 47)
+#define DEBUG_SPARSE (1ull << 48)
#define DEBUG_ANY (~0ull)
{
VkResult result;
+ if (unlikely((submit->buffer_bind_count ||
+ submit->image_opaque_bind_count ||
+ submit->image_bind_count))) {
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== application submitting sparse operations: "
+ "buffer_bind:%d image_opaque_bind:%d image_bind:%d\n",
+ submit->buffer_bind_count, submit->image_opaque_bind_count,
+ submit->image_bind_count);
+ fprintf(stderr, "Error: Using sparse operation. Sparse binding not supported.\n");
+ }
+
if (submit->command_buffer_count == 0) {
result = anv_queue_exec_locked(queue, submit->wait_count, submit->waits,
0 /* cmd_buffer_count */,
if (vk_device_is_lost(&queue->device->vk))
return VK_ERROR_DEVICE_LOST;
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
+
return vk_error(queue, VK_ERROR_FEATURE_NOT_PRESENT);
}
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ if (INTEL_DEBUG(DEBUG_SPARSE) && pInfo->pCreateInfo->flags &
+ (VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
+ VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT |
+ VK_BUFFER_CREATE_SPARSE_ALIASED_BIT))
+ fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
+ __LINE__, pInfo->pCreateInfo->flags);
+
anv_get_buffer_memory_requirements(device,
pInfo->pCreateInfo->size,
pInfo->pCreateInfo->usage,
ANV_FROM_HANDLE(anv_device, device, _device);
struct anv_buffer *buffer;
+ if (INTEL_DEBUG(DEBUG_SPARSE) && (pCreateInfo->flags &
+ (VK_BUFFER_CREATE_SPARSE_BINDING_BIT |
+ VK_BUFFER_CREATE_SPARSE_RESIDENCY_BIT |
+ VK_BUFFER_CREATE_SPARSE_ALIASED_BIT)))
+ fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
+ __LINE__, pCreateInfo->flags);
+
/* Don't allow creating buffers bigger than our address space. The real
* issue here is that we may align up the buffer size and we don't want
* doing so to cause roll-over. However, no one has any business
uint32_t* pNumProperties,
VkSparseImageFormatProperties* pProperties)
{
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
/* Sparse images are not yet supported. */
*pNumProperties = 0;
}
uint32_t* pPropertyCount,
VkSparseImageFormatProperties2* pProperties)
{
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
+
/* Sparse images are not yet supported. */
*pPropertyCount = 0;
}
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ if (INTEL_DEBUG(DEBUG_SPARSE) && (pCreateInfo->flags &
+ (VK_IMAGE_CREATE_SPARSE_BINDING_BIT |
+ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT |
+ VK_IMAGE_CREATE_SPARSE_ALIASED_BIT)))
+ fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
+ __LINE__, pCreateInfo->flags);
+
#ifndef VK_USE_PLATFORM_ANDROID_KHR
/* Ignore swapchain creation info on Android. Since we don't have an
* implementation in Mesa, we're guaranteed to access an Android object
ANV_FROM_HANDLE(anv_device, device, _device);
struct anv_image image = { 0 };
+ if (INTEL_DEBUG(DEBUG_SPARSE) && (pInfo->pCreateInfo->flags &
+ (VK_IMAGE_CREATE_SPARSE_BINDING_BIT |
+ VK_IMAGE_CREATE_SPARSE_RESIDENCY_BIT |
+ VK_IMAGE_CREATE_SPARSE_ALIASED_BIT)))
+ fprintf(stderr, "=== %s %s:%d flags:0x%08x\n", __func__, __FILE__,
+ __LINE__, pInfo->pCreateInfo->flags);
+
ASSERTED VkResult result =
anv_image_init_from_create_info(device, &image, pInfo->pCreateInfo, true);
assert(result == VK_SUCCESS);
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
{
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
*pSparseMemoryRequirementCount = 0;
}
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
{
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
*pSparseMemoryRequirementCount = 0;
}
uint32_t* pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
{
+ if (INTEL_DEBUG(DEBUG_SPARSE))
+ fprintf(stderr, "=== [%s:%d] [%s]\n", __FILE__, __LINE__, __func__);
*pSparseMemoryRequirementCount = 0;
}