st/nine: Set default dynamic_texture_workaround to true

Now the texture virtual memory usage is less of a problem,
we can use this workaround permanently.

In the spirit of the API it's certainly not the proper way
of implementing DYNAMIC textures (it seems they are ok
to have hidden copies in driver managed memory, but not have
virtual addressing space reduced), but it makes sense for us,
both performance wise, and to avoid bugs.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9377>
This commit is contained in:
Axel Davy 2021-02-07 22:01:41 +01:00 committed by Marge Bot
parent 0beb77751e
commit 91755300ec
4 changed files with 4 additions and 9 deletions

View file

@ -149,7 +149,8 @@ NineSurface9_ctor( struct NineSurface9 *This,
TRUE);
if (This->base.info.format != This->format_internal ||
/* DYNAMIC Textures requires same stride as ram buffers.
* Do not use workaround by default as it eats more virtual space */
* The workaround stores a copy in RAM for locks. It eats more virtual space,
* but that is compensated by the use of shmem */
(pParams->device->workarounds.dynamic_texture_workaround &&
pDesc->Pool == D3DPOOL_DEFAULT && pDesc->Usage & D3DUSAGE_DYNAMIC)) {
This->data_internal = nine_allocate(pParams->device->allocator,

View file

@ -119,8 +119,7 @@ NineVolume9_ctor( struct NineVolume9 *This,
This->info.bind, FALSE,
TRUE);
if (This->info.format != This->format_internal ||
/* DYNAMIC Textures requires same stride as ram buffers.
* Do not use workaround by default as it eats more virtual space */
/* See surface9.c */
(pParams->device->workarounds.dynamic_texture_workaround &&
pDesc->Pool == D3DPOOL_DEFAULT && pDesc->Usage & D3DUSAGE_DYNAMIC)) {
This->stride_internal = nine_format_get_stride(This->format_internal,

View file

@ -58,7 +58,7 @@ const driOptionDescription __driConfigOptionsNine[] = {
DRI_CONF_NINE_ALLOWDISCARDDELAYEDRELEASE(true)
DRI_CONF_NINE_TEARFREEDISCARD(false)
DRI_CONF_NINE_CSMT(-1)
DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(false)
DRI_CONF_NINE_DYNAMICTEXTUREWORKAROUND(true)
DRI_CONF_NINE_SHADERINLINECONSTANTS(false)
DRI_CONF_NINE_SHMEM_LIMIT()
DRI_CONF_SECTION_END

View file

@ -612,11 +612,6 @@ TODO: document the other workarounds.
<option name="glsl_correct_derivatives_after_discard" value="true" />
</application>
<!-- Gallium Nine workarounds: -->
<application name="Rayman Legends" executable="Rayman Legends.exe">
<option name="dynamic_texture_workaround" value="true" />
</application>
<!-- Vulkan workarounds: -->
<!-- Works around the game not starting (does not deal with