[Mesa-dev] [PATCH] freedreno: expose GLSL 140 and fake MSAA for GL3.0/3.1 support

Ilia Mirkin imirkin at alum.mit.edu
Mon Nov 9 05:53:05 PST 2015


A few points to note here:

(a) We're obviously faking MSAA support here -- not actually
supporting the 4x MSAA that GL 3.0 requires (although the HW does
support that)
(b) We're only exposing 4 MRT's -- that is a HW limit. I guess one
could do something with a second per-tile runthrough for the
additional MRTs. This might complicate matters for e.g. transform
feedback and atomics.
(c) It appears that gl_ClipVertex is still broken (but that's a GL2
feature) -- should be emulatable same way gl_ClipDistance is.

Outside of those points we do end up with a mostly conformant GL
implementation. There are a few minor additional items, like the
polygon offset not enableable based on polygon mode, and probably a
few others.

I think in spite of that it's reasonable to enable GL3/3.1 for freedreno/a3xx.

  -ilia

On Sun, Nov 8, 2015 at 12:29 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/gallium/drivers/freedreno/freedreno_screen.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c b/src/gallium/drivers/freedreno/freedreno_screen.c
> index 8529f86..9d2cd31 100644
> --- a/src/gallium/drivers/freedreno/freedreno_screen.c
> +++ b/src/gallium/drivers/freedreno/freedreno_screen.c
> @@ -177,6 +177,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>         case PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR:
>         case PIPE_CAP_CONDITIONAL_RENDER:
>         case PIPE_CAP_CONDITIONAL_RENDER_INVERTED:
> +       case PIPE_CAP_FAKE_SW_MSAA:
>                 return is_a3xx(screen) || is_a4xx(screen);
>
>         case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT:
> @@ -206,7 +207,7 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>         case PIPE_CAP_GLSL_FEATURE_LEVEL:
>                 if (glsl120)
>                         return 120;
> -               return is_ir3(screen) ? 130 : 120;
> +               return is_ir3(screen) ? 140 : 120;
>
>         /* Unsupported features. */
>         case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT:
> @@ -221,7 +222,6 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
>         case PIPE_CAP_TGSI_VS_LAYER_VIEWPORT:
>         case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS:
>         case PIPE_CAP_TEXTURE_GATHER_SM5:
> -       case PIPE_CAP_FAKE_SW_MSAA:
>         case PIPE_CAP_TEXTURE_QUERY_LOD:
>         case PIPE_CAP_SAMPLE_SHADING:
>         case PIPE_CAP_TEXTURE_GATHER_OFFSETS:
> --
> 2.4.10
>


More information about the mesa-dev mailing list