Kenneth Graunke | 1 Aug 2012 01:13

Re: [PATCH 1/2] mesa: Replace VersionMajor/VersionMinor with a Version field.

On 07/31/2012 03:24 PM, Eric Anholt wrote:
> As we get into supporting GL 3.x core, we come across more and more features
> of the API that depend on the version number as opposed to just the extension
> list.  This will let us more sanely do version checks than "(VersionMajor == 3
> && VersionMinor >= 2) || VersionMajor >= 4".
> ---
> 
> I didn't like any of the macrofying changes I heard, particularly
> because I expect the minor version to never hit 10 (We've had GL minor
> versions up to a maximum of 3/10 so far), and it provides consistency
> with piglit where we're also using major * 10 + minor.
> 
> I did take Brian's suggestion of removing the old fields, though.
> That was a bit more typing, but I think it was good.
> 
>  src/mesa/drivers/dri/intel/intel_screen.c      |    4 +---
>  src/mesa/drivers/dri/nouveau/nouveau_context.c |    4 +---
>  src/mesa/drivers/dri/r200/r200_context.c       |    4 +---
>  src/mesa/drivers/dri/radeon/radeon_context.c   |    4 +---
>  src/mesa/main/enable.c                         |    4 ++--
>  src/mesa/main/fbobject.c                       |    8 +++----
>  src/mesa/main/get.c                            |   13 ++++++++---
>  src/mesa/main/glformats.c                      |    8 +++----
>  src/mesa/main/mtypes.h                         |    4 ++--
>  src/mesa/main/texformat.c                      |    4 ++--
>  src/mesa/main/teximage.c                       |   15 ++++++------
>  src/mesa/main/texparam.c                       |    2 +-
>  src/mesa/main/varray.c                         |    5 ++--
>  src/mesa/main/version.c                        |   29 ++++++++++++------------
>  src/mesa/state_tracker/st_manager.c            |    3 +--
(Continue reading)

Kenneth Graunke | 1 Aug 2012 01:16

Re: [PATCH 2/2] mesa: Expose texture buffer objects when the context is GL 3.1 core.

On 07/31/2012 03:24 PM, Eric Anholt wrote:
> ---
>  src/mesa/main/bufferobj.c |    3 ++-
>  src/mesa/main/get.c       |   16 +++++++++++-----
>  src/mesa/main/teximage.c  |    6 ++++--
>  3 files changed, 17 insertions(+), 8 deletions(-)
> 
> diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
> index 5fdf52e..7216307 100644
> --- a/src/mesa/main/bufferobj.c
> +++ b/src/mesa/main/bufferobj.c
>  <at>  <at>  -89,7 +89,8  <at>  <at>  get_buffer_target(struct gl_context *ctx, GLenum target)
>        break;
>  #endif
>     case GL_TEXTURE_BUFFER:
> -      if (ctx->Extensions.ARB_texture_buffer_object) {
> +      if (ctx->Extensions.ARB_texture_buffer_object ||
> +          (ctx->API == API_OPENGL && ctx->Version >= 31)) {

I think you want API_OPENGL_CORE here.  API_OPENGL is
legacy/compatibility GL.

>           return &ctx->Texture.BufferObject;
>        }
>        break;
> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
> index 7ffa3c1..a1e6879 100644
> --- a/src/mesa/main/get.c
> +++ b/src/mesa/main/get.c
>  <at>  <at>  -284,6 +284,12  <at>  <at>  static const int extra_GLSL_130[] = {
(Continue reading)

Eric Anholt | 1 Aug 2012 03:04
Gravatar

[PATCH 1/3] meta: Implement sensible behavior for BlitFramebuffer with sRGB.

Prior to GL 4.2 spec, there was no guidance on how to implement
BlitFramebuffer for sRGB.  Mesa chose to implement skipping decode and encode,
providing a reasonable behavior for sRGB -> sRGB or RGB -> RGB, but providing
something absurd for mixing and matching the two.

In GL 4.2, some text appeared in the spec saying to skip decode (search for
"no linearization").  The only non-absurd interpretation of that would be to
have no encode (same as Mesa's current implementation), otherwise sRGB -> sRGB
blits wouldn't work.

However, it seems clear that you should be able to blit sRGB to RGB and RGB to
sRGB and get appropriate conversion.  The ARB has been discussing the issue,
and appears to agree.  So, instead implement the same behavior as gallium, and
always do the decode if the texture is sRGB, and do the encode if the
application asked for it.

Breaks piglit fbo-srgb-blit, which was expecting our previous no-conversion
behavior.
---
 src/mesa/drivers/common/meta.c |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index 6846bbc..e35f0c8 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
 <at>  <at>  -1357,7 +1357,6  <at>  <at>  blitframebuffer_texture(struct gl_context *ctx,
          const GLenum wrapSSave = texObj->Sampler.WrapS;
          const GLenum wrapTSave = texObj->Sampler.WrapT;
          const GLenum srgbSave = texObj->Sampler.sRGBDecode;
(Continue reading)

Eric Anholt | 1 Aug 2012 03:04
Gravatar

sRGB BlitFramebuffer fix (l4d2 works!)

This is the rendering fix idr and I came to agreement on.  I'm hoping this
doesn't make wine angry -- they're the only app I expect would have issues
with this, and I think what they want should be controllable by
GL_FRAMEBUFFER_SRGB (so hopefully things just work).
Eric Anholt | 1 Aug 2012 03:04
Gravatar

[PATCH 2/3] i965: Pass the framebuffer to update_renderbuffer_surface().

We're going to want to look at the framebuffer for window system sRGB
handling.
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c  |    5 +++--
 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |    3 ++-
 src/mesa/drivers/dri/intel/intel_context.h        |    4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 099668e..0744cc0 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
 <at>  <at>  -1051,9 +1051,10  <at>  <at>  brw_update_null_renderbuffer_surface(struct brw_context *brw, unsigned int unit)
  */
 static void
 brw_update_renderbuffer_surface(struct brw_context *brw,
-				struct gl_renderbuffer *rb,
+				struct gl_framebuffer *fb,
 				unsigned int unit)
 {
+   struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[unit];
    struct intel_context *intel = &brw->intel;
    struct gl_context *ctx = &intel->ctx;
    struct intel_renderbuffer *irb = intel_renderbuffer(rb);
 <at>  <at>  -1196,7 +1197,7  <at>  <at>  brw_update_renderbuffer_surfaces(struct brw_context *brw)
    if (ctx->DrawBuffer->_NumColorDrawBuffers >= 1) {
       for (i = 0; i < ctx->DrawBuffer->_NumColorDrawBuffers; i++) {
 	 if (intel_renderbuffer(ctx->DrawBuffer->_ColorDrawBuffers[i])) {
-	    intel->vtbl.update_renderbuffer_surface(brw, ctx->DrawBuffer->_ColorDrawBuffers[i], i);
+	    intel->vtbl.update_renderbuffer_surface(brw, ctx->DrawBuffer, i);
(Continue reading)

Eric Anholt | 1 Aug 2012 03:04
Gravatar

[PATCH 3/3] i965: Flag ARGB8888 renderbuffers as sRGB capable and support it.

Fixes rendering in l4d2, which assumes sRGB capability without asking.  We
could convince the app to ask for sRGB, except that we don't expose visuals
with sRGB currently.  This gives the app the ability to choose sRGB rendering
on the typical visual, without having to coordinate with the layer of software
that's choosing the visual.
---
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c  |    8 ++++++++
 src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |    8 ++++++++
 src/mesa/drivers/dri/intel/intel_screen.c         |   11 ++++++++++-
 3 files changed, 26 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 0744cc0..1b1b513 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
 <at>  <at>  -1118,6 +1118,14  <at>  <at>  brw_update_renderbuffer_surface(struct brw_context *brw,
       else
 	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
       break;
+
+   case MESA_FORMAT_ARGB8888:
+      if (fb->Visual.sRGBCapable && ctx->Color.sRGBEnabled)
+	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
+      else
+	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+      break;
+
    default:
       format = brw->render_target_format[rb_format];
       if (unlikely(!brw->format_supported_as_render_target[rb_format])) {
(Continue reading)

bugzilla-daemon | 1 Aug 2012 04:42

[Bug 52512] Build failures: glsl_lexer.cc & glsl_parser.cc don't exist

https://bugs.freedesktop.org/show_bug.cgi?id=52512

--- Comment #4 from Darren Salt <bugspam <at> moreofthesa.me.uk> 2012-08-01 02:42:04 UTC ---
More information.

make[5]: *** No rule to make target
`../../../../../src/mesa/libdricore/../../glsl/glsl_lexer.cc', needed by
`glsl_lexer.lo'.  Stop.
make[5]: Leaving directory `/.../mesa/build/dri/src/mesa/libdricore'
[...]
$ find -name glsl_lexer.cc
./build/swx11+glu-static/src/glsl/glsl_lexer.cc
./build/dri/src/glsl/glsl_lexer.cc
./build/swx11+glu/src/glsl/glsl_lexer.cc
$

I'd say that out-of-tree builds are currently broken.

--

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
bugzilla-daemon | 1 Aug 2012 06:51

[Bug 52512] Build failures: glsl_lexer.cc & glsl_parser.cc don't exist

https://bugs.freedesktop.org/show_bug.cgi?id=52512

Matt Turner <mattst88 <at> gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |NOTABUG

--- Comment #5 from Matt Turner <mattst88 <at> gmail.com> 2012-08-01 04:51:12 UTC ---
(In reply to comment #4)
> More information.
> 
> make[5]: *** No rule to make target
> `../../../../../src/mesa/libdricore/../../glsl/glsl_lexer.cc', needed by
> `glsl_lexer.lo'.  Stop.
> make[5]: Leaving directory `/.../mesa/build/dri/src/mesa/libdricore'
> [...]
> $ find -name glsl_lexer.cc
> ./build/swx11+glu-static/src/glsl/glsl_lexer.cc
> ./build/dri/src/glsl/glsl_lexer.cc
> ./build/swx11+glu/src/glsl/glsl_lexer.cc
> $

Run git clean -dfx and forget about it.

> I'd say that out-of-tree builds are currently broken.

As in... has never worked. That's one of the reasons we're doing this whole
automake thing.
(Continue reading)

Kenneth Graunke | 1 Aug 2012 07:25

Re: [PATCH 3/3] i965: Flag ARGB8888 renderbuffers as sRGB capable and support it.

On 07/31/2012 06:04 PM, Eric Anholt wrote:
> Fixes rendering in l4d2, which assumes sRGB capability without asking.  We
> could convince the app to ask for sRGB, except that we don't expose visuals
> with sRGB currently.  This gives the app the ability to choose sRGB rendering
> on the typical visual, without having to coordinate with the layer of software
> that's choosing the visual.
> ---
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c  |    8 ++++++++
>  src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |    8 ++++++++
>  src/mesa/drivers/dri/intel/intel_screen.c         |   11 ++++++++++-
>  3 files changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> index 0744cc0..1b1b513 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
>  <at>  <at>  -1118,6 +1118,14  <at>  <at>  brw_update_renderbuffer_surface(struct brw_context *brw,
>        else
>  	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
>        break;
> +
> +   case MESA_FORMAT_ARGB8888:
> +      if (fb->Visual.sRGBCapable && ctx->Color.sRGBEnabled)
> +	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB;
> +      else
> +	 format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
> +      break;
> +
>     default:
>        format = brw->render_target_format[rb_format];
(Continue reading)

Kenneth Graunke | 1 Aug 2012 07:52

Re: [PATCH 1/3] meta: Implement sensible behavior for BlitFramebuffer with sRGB.

On 07/31/2012 06:04 PM, Eric Anholt wrote:
> Prior to GL 4.2 spec, there was no guidance on how to implement
> BlitFramebuffer for sRGB.  Mesa chose to implement skipping decode and encode,
> providing a reasonable behavior for sRGB -> sRGB or RGB -> RGB, but providing
> something absurd for mixing and matching the two.
> 
> In GL 4.2, some text appeared in the spec saying to skip decode (search for
> "no linearization").  The only non-absurd interpretation of that would be to
> have no encode (same as Mesa's current implementation), otherwise sRGB -> sRGB
> blits wouldn't work.
> 
> However, it seems clear that you should be able to blit sRGB to RGB and RGB to
> sRGB and get appropriate conversion.  The ARB has been discussing the issue,
> and appears to agree.  So, instead implement the same behavior as gallium, and
> always do the decode if the texture is sRGB, and do the encode if the
> application asked for it.
> 
> Breaks piglit fbo-srgb-blit, which was expecting our previous no-conversion
> behavior.
> ---
>  src/mesa/drivers/common/meta.c |   14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 6846bbc..e35f0c8 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
>  <at>  <at>  -1357,7 +1357,6  <at>  <at>  blitframebuffer_texture(struct gl_context *ctx,
>           const GLenum wrapSSave = texObj->Sampler.WrapS;
>           const GLenum wrapTSave = texObj->Sampler.WrapT;
(Continue reading)


Gmane