Discussion:
[PATCH 1/2] radv: fix a case statement in GetMemoryFdPropertiesKHR
Add Reply
Fredrik Höglund
2017-12-05 20:51:14 UTC
Reply
Permalink
Raw Message
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.

Signed-off-by: Fredrik Höglund <***@kde.org>
---
src/amd/vulkan/radv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 1b7cd355938..2538472bea6 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -3557,7 +3557,7 @@ VkResult radv_GetMemoryFdPropertiesKHR(VkDevice _device,
VkMemoryFdPropertiesKHR *pMemoryFdProperties)
{
switch (handleType) {
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR:
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
pMemoryFdProperties->memoryTypeBits = (1 << RADV_MEM_TYPE_COUNT) - 1;
return VK_SUCCESS;
--
2.15.0
Fredrik Höglund
2017-12-05 20:51:15 UTC
Reply
Permalink
Raw Message
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.

Signed-off-by: Fredrik Höglund <***@kde.org>
---
src/intel/vulkan/anv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 97124154b69..af804612654 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1714,7 +1714,7 @@ VkResult anv_GetMemoryFdPropertiesKHR(
struct anv_physical_device *pdevice = &device->instance->physicalDevice;

switch (handleType) {
- case VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT_KHR:
+ case VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT:
/* dma-buf can be imported as any memory type */
pMemoryFdProperties->memoryTypeBits =
(1 << pdevice->memory.type_count) - 1;
--
2.15.0
Jason Ekstrand
2017-12-05 21:04:38 UTC
Reply
Permalink
Raw Message
Oops. Both are
Post by Fredrik Höglund
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.
---
src/intel/vulkan/anv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 97124154b69..af804612654 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1714,7 +1714,7 @@ VkResult anv_GetMemoryFdPropertiesKHR(
struct anv_physical_device *pdevice = &device->instance->
physicalDevice;
switch (handleType) {
/* dma-buf can be imported as any memory type */
pMemoryFdProperties->memoryTypeBits =
(1 << pdevice->memory.type_count) - 1;
--
2.15.0
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Samuel Pitoiset
2017-12-06 09:41:40 UTC
Reply
Permalink
Raw Message
Post by Fredrik Höglund
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.
---
src/amd/vulkan/radv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 1b7cd355938..2538472bea6 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -3557,7 +3557,7 @@ VkResult radv_GetMemoryFdPropertiesKHR(VkDevice _device,
VkMemoryFdPropertiesKHR *pMemoryFdProperties)
{
switch (handleType) {
pMemoryFdProperties->memoryTypeBits = (1 << RADV_MEM_TYPE_COUNT) - 1;
return VK_SUCCESS;
Emil Velikov
2017-12-06 16:12:23 UTC
Reply
Permalink
Raw Message
Post by Fredrik Höglund
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.
For the future please include a fixes tag if the commit is known.

Here
Fixes: 546e747867c ("radv: Implement VK_EXT_external_memory_dma_buf")

And for 2/2
Fixes: ab18e8e59b6 ("anv: Implement VK_EXT_external_memory_dma_buf")

Thanks
Emil
Fredrik Höglund
2017-12-06 19:07:10 UTC
Reply
Permalink
Raw Message
Post by Emil Velikov
Post by Fredrik Höglund
The handle type in the case statement is supposed to be VK_EXTERNAL_-
MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT.
For the future please include a fixes tag if the commit is known.
Here
Fixes: 546e747867c ("radv: Implement VK_EXT_external_memory_dma_buf")
And for 2/2
Fixes: ab18e8e59b6 ("anv: Implement VK_EXT_external_memory_dma_buf")
I thought those commits were only in the master branch, but I've pushed
the patches now with those tags.

Thanks,
Fredrik

Loading...