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

2016-04-16 Thread Grigori Goronzy
On 2016-04-15 20:30, Jakob Sinclair wrote: 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 cleane

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

2016-04-15 Thread Jakob Sinclair
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_R32G

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

2016-04-15 Thread Grigori Goronzy
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 sa

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

2016-04-15 Thread Ilia Mirkin
On Fri, Apr 15, 2016 at 12:33 PM, Jakob Sinclair wrote: > This patch adds the needed function for ARB_clear_texture. > The function itself is mostly based on the nouveau implementation. > > Signed-off-by: Jakob Sinclair > --- > src/gallium/drivers/radeon/r600_texture.c | 72 > ++

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

2016-04-15 Thread Jakob Sinclair
On 2016-04-15 18:38, Ilia Mirkin wrote: 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...)

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

2016-04-15 Thread Ilia Mirkin
On Fri, Apr 15, 2016 at 12:33 PM, Jakob Sinclair wrote: > This patch adds the needed function for ARB_clear_texture. > The function itself is mostly based on the nouveau implementation. > > Signed-off-by: Jakob Sinclair > --- > src/gallium/drivers/radeon/r600_texture.c | 72 > ++

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

2016-04-15 Thread Jakob Sinclair
This patch adds the needed function for ARB_clear_texture. The function itself is mostly based on the nouveau implementation. Signed-off-by: Jakob Sinclair --- src/gallium/drivers/radeon/r600_texture.c | 72 +++ 1 file changed, 72 insertions(+) diff --git a/src/galli