On Mon, Jan 18, 2016 at 6:52 PM, Nicolai Hähnle <nhaeh...@gmail.com> wrote: > > > On 18.01.2016 18:50, Ilia Mirkin wrote: >> >> On Mon, Jan 18, 2016 at 5:22 PM, Nicolai Hähnle <nhaeh...@gmail.com> >> wrote: >>> >>> diff --git a/src/gallium/drivers/nouveau/nv30/nv30_screen.c >>> b/src/gallium/drivers/nouveau/nv30/nv30_screen.c >>> index 933330f..1ae557d 100644 >>> --- a/src/gallium/drivers/nouveau/nv30/nv30_screen.c >>> +++ b/src/gallium/drivers/nouveau/nv30/nv30_screen.c >>> @@ -75,6 +75,8 @@ nv30_screen_get_param(struct pipe_screen *pscreen, enum >>> pipe_cap param) >>> return 1; >>> case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE: >>> return 2048; >>> + case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY: >>> + return 0; >>> /* supported capabilities */ >>> case PIPE_CAP_TWO_SIDED_STENCIL: >>> case PIPE_CAP_ANISOTROPIC_FILTER: >>> diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c >>> b/src/gallium/drivers/nouveau/nv50/nv50_screen.c >>> index 712835c..99d7ae6 100644 >>> --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c >>> +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c >>> @@ -121,6 +121,8 @@ nv50_screen_get_param(struct pipe_screen *pscreen, >>> enum pipe_cap param) >>> return 256; >>> case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: >>> return 1; /* 256 for binding as RT, but that's not possible in GL >>> */ >>> + case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY: >>> + return 0; >>> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: >>> return NOUVEAU_MIN_BUFFER_MAP_ALIGN; >>> case PIPE_CAP_MAX_VIEWPORTS: >>> diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c >>> b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c >>> index 7211df9..612f1c0 100644 >>> --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c >>> +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c >>> @@ -111,6 +111,8 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, >>> enum pipe_cap param) >>> return 256; >>> case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: >>> return 1; /* 256 for binding as RT, but that's not possible in GL >>> */ >>> + case PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY: >>> + return 0; >>> case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: >>> return NOUVEAU_MIN_BUFFER_MAP_ALIGN; >>> case PIPE_CAP_MAX_VIEWPORTS: >> >> >> I would greatly appreciate it if you could stick these into the >> "unsupported" list of caps -- each of nv30/nv50/nvc0 should have one, >> of varying length. (Same applies to the other cap you're adding.) > > > Do you really want that? I actually put them aside on purpose, because the > somewhat unusual sense of the cap means that the return value of 1 is > something unsupported. Of course, one might argue that I should have changed > the boolean sense and renamed it to something like > PIPE_CAP_BUFFER_SAMPLER_VIEW_SWIZZLES.
Oh I see. Yes, that is somewhat odd. Most caps return 0 for unsupported and 1 for supported. I have a mild preference to flipping the meaning, but wait to see if others have similar feedback before doing the work of flipping it. But ultimately you could argue that there's a highly sought-after capability of "rgba only" and nouveau doesn't support it :) I think I'd still prefer to see it in the unsupported list if you don't mind. (Or in the supported list if you should flip the meaning.) -ilia _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev