mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
turnip: Make multiview support configurable per generation
a610 and similar models don't have HW support for multiview, proprietary driver unrolls the drall calls instead. Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20991>
This commit is contained in:
parent
3d299bc7ef
commit
9ed32b386a
3 changed files with 11 additions and 6 deletions
|
|
@ -70,6 +70,8 @@ struct fd_dev_info {
|
|||
*/
|
||||
uint32_t instr_cache_size;
|
||||
|
||||
bool has_hw_multiview;
|
||||
|
||||
/* Whether the PC_MULTIVIEW_MASK register exists. */
|
||||
bool supports_multiview_mask;
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@ class A6xxGPUInfo(GPUInfo):
|
|||
self.a6xx.has_8bpp_ubwc = True
|
||||
|
||||
self.a6xx.has_gmem_fast_clear = True
|
||||
self.a6xx.has_hw_multiview = True
|
||||
|
||||
self.a6xx.sysmem_per_ccu_cache_size = 64 * 1024
|
||||
self.a6xx.gmem_ccu_color_cache_fraction = CCUColorCacheFraction.QUARTER.value
|
||||
|
|
@ -246,6 +247,7 @@ a6xx_gen1 = dict(
|
|||
# a605, a608, a610, 612
|
||||
a6xx_gen1_low = {**a6xx_gen1, **dict(
|
||||
has_gmem_fast_clear = False,
|
||||
has_hw_multiview = False,
|
||||
sysmem_per_ccu_cache_size = 8 * 1024,
|
||||
gmem_ccu_color_cache_fraction = CCUColorCacheFraction.HALF.value,
|
||||
vs_max_inputs_count = 16,
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ get_device_extensions(const struct tu_physical_device *device,
|
|||
.KHR_maintenance2 = true,
|
||||
.KHR_maintenance3 = true,
|
||||
.KHR_maintenance4 = true,
|
||||
.KHR_multiview = true,
|
||||
.KHR_multiview = device->info->a6xx.has_hw_multiview,
|
||||
.KHR_performance_query = TU_DEBUG(PERFC),
|
||||
.KHR_pipeline_executable_properties = true,
|
||||
.KHR_pipeline_library = true,
|
||||
|
|
@ -258,7 +258,7 @@ get_device_extensions(const struct tu_physical_device *device,
|
|||
.EXT_shader_demote_to_helper_invocation = true,
|
||||
.EXT_shader_module_identifier = true,
|
||||
.EXT_shader_stencil_export = true,
|
||||
.EXT_shader_viewport_index_layer = true,
|
||||
.EXT_shader_viewport_index_layer = device->info->a6xx.has_hw_multiview,
|
||||
.EXT_subgroup_size_control = true,
|
||||
.EXT_texel_buffer_alignment = true,
|
||||
.EXT_tooling_info = true,
|
||||
|
|
@ -302,7 +302,7 @@ tu_get_features(struct tu_physical_device *pdevice,
|
|||
features->wideLines = false;
|
||||
features->largePoints = true;
|
||||
features->alphaToOne = true;
|
||||
features->multiViewport = true;
|
||||
features->multiViewport = pdevice->info->a6xx.has_hw_multiview;
|
||||
features->samplerAnisotropy = true;
|
||||
features->textureCompressionETC2 = true;
|
||||
features->textureCompressionASTC_LDR = true;
|
||||
|
|
@ -335,7 +335,7 @@ tu_get_features(struct tu_physical_device *pdevice,
|
|||
features->uniformAndStorageBuffer16BitAccess = false;
|
||||
features->storagePushConstant16 = false;
|
||||
features->storageInputOutput16 = false;
|
||||
features->multiview = true;
|
||||
features->multiview = pdevice->info->a6xx.has_hw_multiview;
|
||||
features->multiviewGeometryShader = false;
|
||||
features->multiviewTessellationShader = false;
|
||||
features->variablePointersStorageBuffer = true;
|
||||
|
|
@ -869,7 +869,8 @@ tu_get_physical_device_properties_1_1(struct tu_physical_device *pdevice,
|
|||
p->subgroupQuadOperationsInAllStages = false;
|
||||
|
||||
p->pointClippingBehavior = VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES;
|
||||
p->maxMultiviewViewCount = MAX_VIEWS;
|
||||
p->maxMultiviewViewCount =
|
||||
pdevice->info->a6xx.has_hw_multiview ? MAX_VIEWPORTS : 1;
|
||||
p->maxMultiviewInstanceIndex = INT_MAX;
|
||||
p->protectedNoFault = false;
|
||||
/* Our largest descriptors are 2 texture descriptors, or a texture and
|
||||
|
|
@ -1103,7 +1104,7 @@ tu_GetPhysicalDeviceProperties2(VkPhysicalDevice physicalDevice,
|
|||
.maxDrawIndirectCount = UINT32_MAX,
|
||||
.maxSamplerLodBias = 4095.0 / 256.0, /* [-16, 15.99609375] */
|
||||
.maxSamplerAnisotropy = 16,
|
||||
.maxViewports = MAX_VIEWPORTS,
|
||||
.maxViewports = pdevice->info->a6xx.has_hw_multiview ? MAX_VIEWPORTS : 1,
|
||||
.maxViewportDimensions = { MAX_VIEWPORT_SIZE, MAX_VIEWPORT_SIZE },
|
||||
.viewportBoundsRange = { INT16_MIN, INT16_MAX },
|
||||
.viewportSubPixelBits = 8,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue