Reviewed-by: Ilia Mirkin <[email protected]> But one very very minor change, no need to re-send, just fix it up locally:
On Thu, Nov 1, 2018 at 8:00 AM Gert Wollny <[email protected]> wrote: > > From: Gert Wollny <[email protected]> > > This only adds support on the Gallium core level, for the drivers > it is likely that additional changes are needed to support the > new texture format and thereby enabling the extension. > > Enables on softpipe and makes pass: > dEQP-GLES31.functional.srgb_texture_decode.skip_decode.sr8.* > > v2: - add include for getting GL_SR8_EXT > v4: - since the extension is not required don't bother providing > a fallback (Ilia Mirkin) > - split patch (2/2) to separate Gallium and mesa/st parts > (Roland Scheidegger) > - trim commit message to only contain the history of the patch > relevant to this part > v5: - don't include GLES headers (required enum has been added to glheader.h) > (Ilia Mirkin) > > Signed-off-by: Gert Wollny <[email protected]> > --- > src/mesa/state_tracker/st_extensions.c | 4 ++++ > src/mesa/state_tracker/st_format.c | 9 ++++++++- > 2 files changed, 12 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/state_tracker/st_extensions.c > b/src/mesa/state_tracker/st_extensions.c > index 798ee60875..16889074f6 100644 > --- a/src/mesa/state_tracker/st_extensions.c > +++ b/src/mesa/state_tracker/st_extensions.c > @@ -889,6 +889,10 @@ void st_init_extensions(struct pipe_screen *screen, > PIPE_FORMAT_R8G8B8A8_SRGB}, > GL_TRUE }, /* at least one format must be supported */ > > + { { o(EXT_texture_sRGB_R8) }, > + { PIPE_FORMAT_R8_SRGB }, > + GL_TRUE }, > + > { { o(EXT_texture_type_2_10_10_10_REV) }, > { PIPE_FORMAT_R10G10B10A2_UNORM, > PIPE_FORMAT_B10G10R10A2_UNORM }, > diff --git a/src/mesa/state_tracker/st_format.c > b/src/mesa/state_tracker/st_format.c > index 16a18c272d..7a57787b23 100644 > --- a/src/mesa/state_tracker/st_format.c > +++ b/src/mesa/state_tracker/st_format.c > @@ -54,7 +54,6 @@ > #include "st_format.h" > #include "st_texture.h" > > - Leave this line be. I'm guessing this happened when you removed the GLES2 header includes. > /** > * Translate Mesa format to Gallium format. > */ > @@ -169,6 +168,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st, > return PIPE_FORMAT_AL88_SRGB; > case MESA_FORMAT_L_SRGB8: > return PIPE_FORMAT_L8_SRGB; > + case MESA_FORMAT_R_SRGB8: > + return PIPE_FORMAT_R8_SRGB; > case MESA_FORMAT_BGR_SRGB8: > return PIPE_FORMAT_R8G8B8_SRGB; > case MESA_FORMAT_A8B8G8R8_SRGB: > @@ -719,6 +720,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format) > return MESA_FORMAT_A8L8_SRGB; > case PIPE_FORMAT_L8_SRGB: > return MESA_FORMAT_L_SRGB8; > + case PIPE_FORMAT_R8_SRGB: > + return MESA_FORMAT_R_SRGB8; > case PIPE_FORMAT_R8G8B8_SRGB: > return MESA_FORMAT_BGR_SRGB8; > case PIPE_FORMAT_ABGR8888_SRGB: > @@ -1423,6 +1426,10 @@ static const struct format_mapping format_map[] = { > 0 }, > { PIPE_FORMAT_L8_SRGB, DEFAULT_SRGBA_FORMATS } > }, > + { > + { GL_SR8_EXT, 0 }, > + { PIPE_FORMAT_R8_SRGB, 0 } > + }, > > /* 16-bit float formats */ > { > -- > 2.18.1 > _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
