diff --git a/src/imagination/vulkan/pvr_image.c b/src/imagination/vulkan/pvr_image.c index f2995b80d5c..056110a26e5 100644 --- a/src/imagination/vulkan/pvr_image.c +++ b/src/imagination/vulkan/pvr_image.c @@ -29,7 +29,6 @@ #include #include "pvr_buffer.h" -#include "pvr_csb.h" #include "pvr_device.h" #include "pvr_device_info.h" #include "pvr_entrypoints.h" @@ -155,11 +154,7 @@ static void pvr_image_setup_mip_levels(struct pvr_image *image) } static unsigned -get_pbe_stride_align(const struct pvr_device_info *dev_info) -{ - return PVR_HAS_FEATURE(dev_info, pbe_stride_align_1pixel) ? - 1 : ROGUE_PBESTATE_REG_WORD0_LINESTRIDE_UNIT_SIZE; -} +get_pbe_stride_align(const struct pvr_device_info *dev_info); VkResult pvr_CreateImage(VkDevice _device, const VkImageCreateInfo *pCreateInfo, @@ -587,3 +582,13 @@ void pvr_DestroyBufferView(VkDevice _device, vk_buffer_view_destroy(&device->vk, pAllocator, &bview->vk); } + +/* Leave this at the very end, to avoid leakage of HW-defs here */ +#include "pvr_csb.h" + +static unsigned +get_pbe_stride_align(const struct pvr_device_info *dev_info) +{ + return PVR_HAS_FEATURE(dev_info, pbe_stride_align_1pixel) ? + 1 : ROGUE_PBESTATE_REG_WORD0_LINESTRIDE_UNIT_SIZE; +} diff --git a/src/imagination/vulkan/pvr_physical_device.c b/src/imagination/vulkan/pvr_physical_device.c index 0c646913f86..20c172086c3 100644 --- a/src/imagination/vulkan/pvr_physical_device.c +++ b/src/imagination/vulkan/pvr_physical_device.c @@ -27,7 +27,6 @@ #include "pco/pco.h" #include "pco_uscgen_programs.h" -#include "pvr_border.h" #include "pvr_device.h" #include "pvr_dump_info.h" #include "pvr_entrypoints.h" @@ -477,6 +476,9 @@ static uint32_t get_api_version(void) return VK_MAKE_API_VERSION(0, 1, 2, VK_HEADER_VERSION); } +static unsigned +get_custom_border_color_samplers(const struct pvr_device_info *dev_info); + static bool pvr_physical_device_get_properties( const struct pvr_physical_device *const pdevice, struct vk_properties *const properties) @@ -798,7 +800,8 @@ static bool pvr_physical_device_get_properties( .supportsNonZeroFirstInstance = true, /* VK_EXT_custom_border_color */ - .maxCustomBorderColorSamplers = PVR_BORDER_COLOR_TABLE_NR_CUSTOM_ENTRIES, + .maxCustomBorderColorSamplers = + get_custom_border_color_samplers(&pdevice->dev_info), /* VkPhysicalDeviceDrmPropertiesEXT */ .drmHasPrimary = true, @@ -1190,3 +1193,13 @@ void pvr_DestroyDevice(VkDevice _device, pvr_destroy_device(device, pAllocator); } + +/* Leave this at the very end, to avoid leakage of HW-defs here */ +#include "pvr_border.h" + +static unsigned +get_custom_border_color_samplers(const struct pvr_device_info *dev_info) +{ + assert(dev_info->ident.arch == PVR_DEVICE_ARCH_ROGUE); + return PVR_BORDER_COLOR_TABLE_NR_CUSTOM_ENTRIES; +}