mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 06:18:10 +02:00
radv: add radv_force_64_byte_sampled_image dri conf option
Cc: mesa-stable Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41680>
This commit is contained in:
parent
1b8465a38f
commit
1234a01dda
7 changed files with 16 additions and 2 deletions
|
|
@ -1166,6 +1166,7 @@ radv_device_init_compiler_info(struct radv_device *device)
|
|||
.mesh_shader_queries = mesh_shader_queries,
|
||||
.image_2d_view_of_3d = image_2d_view_of_3d,
|
||||
.use_fmask = pdev->use_fmask,
|
||||
.force_64_byte_sampled_image = pdev->force_64_byte_sampled_image,
|
||||
.robust_buffer_access = pdev->use_llvm && (device->vk.enabled_features.robustBufferAccess2 ||
|
||||
device->vk.enabled_features.robustBufferAccess),
|
||||
.mitigate_smem_oob = pdev->info.compiler_info.has_smem_oob_access_bug &&
|
||||
|
|
|
|||
|
|
@ -234,6 +234,7 @@ static const driOptionDescription radv_dri_options[] = {
|
|||
DRI_CONF_RADV_WAIT_FOR_VM_MAP_UPDATES(false)
|
||||
DRI_CONF_RADV_NO_IMPLICIT_VARYING_SUBGROUP_SIZE(false)
|
||||
DRI_CONF_RADV_HIDE_REBAR_ON_DGPU(false)
|
||||
DRI_CONF_RADV_FORCE_64_BYTE_SAMPLED_IMAGE(false)
|
||||
DRI_CONF_SECTION_END
|
||||
};
|
||||
// clang-format on
|
||||
|
|
@ -280,6 +281,7 @@ radv_init_dri_debug_options(struct radv_instance *instance)
|
|||
|
||||
drirc->debug.rt_wave64 = driQueryOptionb(&drirc->options, "radv_rt_wave64");
|
||||
drirc->debug.hide_rebar_on_dgpu = driQueryOptionb(&drirc->options, "radv_hide_rebar_on_dgpu");
|
||||
drirc->debug.force_64_byte_sampled_image = driQueryOptionb(&drirc->options, "radv_force_64_byte_sampled_image");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ struct radv_drirc {
|
|||
bool no_implicit_varying_subgroup_size;
|
||||
bool rt_wave64;
|
||||
bool hide_rebar_on_dgpu;
|
||||
bool force_64_byte_sampled_image;
|
||||
char *app_layer;
|
||||
int override_uniform_offset_alignment;
|
||||
} debug;
|
||||
|
|
|
|||
|
|
@ -2591,6 +2591,8 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
|
|||
|
||||
pdev->use_fmask = pdev->info.compiler_info.has_fmask && !(instance->debug_flags & RADV_DEBUG_NO_FMASK);
|
||||
|
||||
pdev->force_64_byte_sampled_image = !pdev->use_fmask && instance->drirc.debug.force_64_byte_sampled_image;
|
||||
|
||||
pdev->use_hiz = !(instance->debug_flags & RADV_DEBUG_NO_HIZ);
|
||||
|
||||
if (pdev->info.gfx_level == GFX12) {
|
||||
|
|
|
|||
|
|
@ -89,6 +89,9 @@ struct radv_physical_device {
|
|||
/* Whether to enable FMASK compression for MSAA textures (GFX6-GFX10.3) */
|
||||
bool use_fmask;
|
||||
|
||||
/* Whether to use space for 2 descriptors for sampled image descriptors, even when fmask is disabled. */
|
||||
bool force_64_byte_sampled_image;
|
||||
|
||||
/* Whether to enable HTILE compression for depth/stencil images. */
|
||||
bool use_hiz;
|
||||
|
||||
|
|
@ -274,7 +277,7 @@ static inline uint32_t
|
|||
radv_get_sampled_image_desc_size(const struct radv_physical_device *pdev)
|
||||
{
|
||||
/* Main descriptor + FMASK desccriptor if needed. */
|
||||
return 32 + (pdev->use_fmask ? 32 : 0);
|
||||
return 32 + (pdev->use_fmask || pdev->force_64_byte_sampled_image ? 32 : 0);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@ struct radv_compiler_info {
|
|||
uint32_t mesh_shader_queries : 1;
|
||||
uint32_t image_2d_view_of_3d : 1;
|
||||
uint32_t use_fmask : 1;
|
||||
uint32_t force_64_byte_sampled_image : 1;
|
||||
uint32_t robust_buffer_access : 1; /* Only used by LLVM. */
|
||||
uint32_t mitigate_smem_oob : 1;
|
||||
uint32_t mitigate_smem_with_null_prt : 1;
|
||||
|
|
@ -544,7 +545,7 @@ struct radv_compiler_info {
|
|||
uint32_t tex_non_uniform : 1;
|
||||
uint32_t lower_terminate_to_discard : 1;
|
||||
uint32_t no_implicit_varying_subgroup_size : 1;
|
||||
uint32_t padding : 31;
|
||||
uint32_t padding : 30;
|
||||
|
||||
int32_t force_aniso;
|
||||
|
||||
|
|
|
|||
|
|
@ -862,6 +862,10 @@
|
|||
DRI_CONF_OPT_B(radv_hide_rebar_on_dgpu, def, \
|
||||
"Hide resizable bar on dGPUs by exposing a fake carveout of 256MiB.")
|
||||
|
||||
#define DRI_CONF_RADV_FORCE_64_BYTE_SAMPLED_IMAGE(def) \
|
||||
DRI_CONF_OPT_B(radv_force_64_byte_sampled_image, def, \
|
||||
"Force sampled images size to 64 bytes.")
|
||||
|
||||
/**
|
||||
* \brief ANV specific configuration options
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue