summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2018-11-12 14:42:36 -0800
committerChia-I Wu <[email protected]>2019-03-11 10:01:41 -0700
commitbf709dfe3f82a1b58e8d332bce7770ae4b72f6c1 (patch)
tree9565db0d9167264f426d69cdc26624ad8545dfdc /src/freedreno
parent471f2d8409a4bc76e849f6d86639a2cef21d9e2f (diff)
turnip: Fix 'unused' warnings
Now turnip builds without warnings on my machine.
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c4
-rw-r--r--src/freedreno/vulkan/tu_descriptor_set.c16
-rw-r--r--src/freedreno/vulkan/tu_device.c7
-rw-r--r--src/freedreno/vulkan/tu_private.h8
4 files changed, 26 insertions, 9 deletions
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index d3b68e5fd0a..5c83bca5538 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -67,7 +67,7 @@ const struct tu_dynamic_state default_dynamic_state = {
},
};
-static void
+static void UNUSED /* FINISHME */
tu_bind_dynamic_state(struct tu_cmd_buffer *cmd_buffer,
const struct tu_dynamic_state *src)
{
@@ -75,6 +75,8 @@ tu_bind_dynamic_state(struct tu_cmd_buffer *cmd_buffer,
uint32_t copy_mask = src->mask;
uint32_t dest_mask = 0;
+ tu_use_args(cmd_buffer); /* FINISHME */
+
/* Make sure to copy the number of viewports/scissors because they can
* only be specified at pipeline creation time.
*/
diff --git a/src/freedreno/vulkan/tu_descriptor_set.c b/src/freedreno/vulkan/tu_descriptor_set.c
index 1ea7f6870c4..7d3b8a6b7b1 100644
--- a/src/freedreno/vulkan/tu_descriptor_set.c
+++ b/src/freedreno/vulkan/tu_descriptor_set.c
@@ -101,6 +101,7 @@ tu_CreateDescriptorSetLayout(
/* We just allocate all the samplers at the end of the struct */
uint32_t *samplers = (uint32_t *)&set_layout->binding[max_binding + 1];
+ (void) samplers; /* TODO: Use me */
VkDescriptorSetLayoutBinding *bindings =
create_sorted_bindings(pCreateInfo->pBindings, pCreateInfo->bindingCount);
@@ -402,8 +403,8 @@ tu_CreateDescriptorPool(VkDevice _device,
VkDescriptorPool *pDescriptorPool)
{
TU_FROM_HANDLE(tu_device, device, _device);
- struct tu_descriptor_pool *pool;
-
+ tu_use_args(device);
+ tu_stub();
return VK_SUCCESS;
}
@@ -422,6 +423,8 @@ tu_ResetDescriptorPool(VkDevice _device,
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, descriptorPool);
+ tu_use_args(device, pool);
+ tu_stub();
return VK_SUCCESS;
}
@@ -433,6 +436,8 @@ tu_AllocateDescriptorSets(VkDevice _device,
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, pAllocateInfo->descriptorPool);
+ tu_use_args(device, pool);
+ tu_stub();
return VK_SUCCESS;
}
@@ -445,6 +450,8 @@ tu_FreeDescriptorSets(VkDevice _device,
TU_FROM_HANDLE(tu_device, device, _device);
TU_FROM_HANDLE(tu_descriptor_pool, pool, descriptorPool);
+ tu_use_args(device, pool);
+ tu_stub();
return VK_SUCCESS;
}
@@ -492,7 +499,6 @@ tu_CreateDescriptorUpdateTemplate(
sizeof(struct tu_descriptor_update_template) +
sizeof(struct tu_descriptor_update_template_entry) * entry_count;
struct tu_descriptor_update_template *templ;
- uint32_t i;
templ = vk_alloc2(
&device->alloc, pAllocator, size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
@@ -500,6 +506,9 @@ tu_CreateDescriptorUpdateTemplate(
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
*pDescriptorUpdateTemplate = tu_descriptor_update_template_to_handle(templ);
+
+ tu_use_args(set_layout);
+ tu_stub();
return VK_SUCCESS;
}
@@ -529,6 +538,7 @@ tu_update_descriptor_set_with_template(
{
TU_FROM_HANDLE(
tu_descriptor_update_template, templ, descriptorUpdateTemplate);
+ tu_use_args(templ);
}
void
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 4cf85b269a6..01fbe937478 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -65,7 +65,8 @@ tu_get_driver_uuid(void *uuid)
static void
tu_get_device_uuid(void *uuid)
{
- stub();
+ tu_use_args(uuid);
+ tu_stub();
}
VkResult
@@ -1459,7 +1460,7 @@ tu_GetImageSparseMemoryRequirements(
uint32_t *pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements *pSparseMemoryRequirements)
{
- stub();
+ tu_stub();
}
void
@@ -1469,7 +1470,7 @@ tu_GetImageSparseMemoryRequirements2(
uint32_t *pSparseMemoryRequirementCount,
VkSparseImageMemoryRequirements2KHR *pSparseMemoryRequirements)
{
- stub();
+ tu_stub();
}
void
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h
index ccd768e0230..26a342f6652 100644
--- a/src/freedreno/vulkan/tu_private.h
+++ b/src/freedreno/vulkan/tu_private.h
@@ -258,13 +258,17 @@ tu_logi_v(const char *format, va_list va);
#define tu_assert(x)
#endif
-#define stub_return(v) \
+/* Suppress -Wunused in stub functions */
+#define tu_use_args(...) __tu_use_args(0, ##__VA_ARGS__)
+static inline void __tu_use_args(int ignore, ...) {}
+
+#define tu_stub_return(v) \
do { \
tu_finishme("stub %s", __func__); \
return (v); \
} while (0)
-#define stub() \
+#define tu_stub() \
do { \
tu_finishme("stub %s", __func__); \
return; \