On 2016-04-15 19:23, Grigori Goronzy wrote:
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

Thanks for the information. Just want to make sure I got the surface template solution right:

First you create an surface object which you will then copy over information too. Then you can edit things like the format without worrying about something going horribly wrong. Then you can use that object to create a new surface which the old surface can now point too.

Did I get the idea behind it or did I misunderstand the whole thing?

--
Mvh Jakob Sinclair
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to