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
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to