[Mesa-dev] [PATCH] gallium/radeon: add a flag that forces VRAM placement for everything

Marek Olšák maraeo at gmail.com
Tue Dec 22 03:38:39 PST 2015


On Tue, Dec 22, 2015 at 4:57 AM, Michel Dänzer <michel at daenzer.net> wrote:
> On 22.12.2015 07:36, Marek Olšák wrote:
>>
>> diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
>> index 484f5c8..21fe498 100644
>> --- a/src/gallium/drivers/radeon/r600_buffer_common.c
>> +++ b/src/gallium/drivers/radeon/r600_buffer_common.c
>> @@ -138,6 +138,11 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
>>               break;
>>       }
>>
>> +     if (rscreen->debug_flags & DBG_FORCE_VRAM) {
>> +             res->domains = RADEON_DOMAIN_VRAM;
>> +             flags |= RADEON_FLAG_GTT_WC;
>> +     }
>
> What is the rationale for this? It will make CPU reads from buffers
> which are correctly marked as PIPE_USAGE_STAGING very slow. Might it
> make more sense to allow overriding this separately for
> PIPE_USAGE_STAGING and PIPE_USAGE_STREAM?

The rationale is to see if bad usage flags make performance worse.

Marek


More information about the mesa-dev mailing list