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

Michel Dänzer michel at daenzer.net
Thu Dec 24 00:21:21 PST 2015


On 22.12.2015 20:38, Marek Olšák wrote:
> 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.

That's what I thought, so my other question still stands. Seems like the
results might not be too meaningful in some cases if forcing both
PIPE_USAGE_STAGING and PIPE_USAGE_STREAM to VRAM.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list