[Mesa-dev] [PATCH 1/4] gallium/radeon: add clear_texture function

Grigori Goronzy greg at chown.ath.cx
Fri Apr 15 17:23:25 UTC 2016


On 2016-04-15 18:38, Ilia Mirkin wrote:
>> +       } else {
>> +               union pipe_color_union color;
>> +               switch (util_format_get_blocksizebits(res->format)) {
>> +               case 128:
>> +                       sf->format = PIPE_FORMAT_R32G32B32A32_UINT;
> 
> Just as an FYI... this is safe on nouveau because I control all the
> internals and know that this is safe to do. Please verify that it's
> similarly safe to change the surface format after creation on radeon -
> it might not be. (Esp for compressed textures...)
> 

In other places in radeonsi that require reinterpretation (e.g. 
si_blit.c), the surface template is modified instead of changing the 
surface after creation. I'm not sure if r600/radeonsi like it if the 
format is changed late like here. Seems to be cleaner and clearer to 
change the template anyway.

Grigori


More information about the mesa-dev mailing list