mesa.git
9 years agonvc0: do not expose MP counters for nvf0 (GK110+)
Samuel Pitoiset [Mon, 11 May 2015 19:36:16 +0000 (21:36 +0200)]
nvc0: do not expose MP counters for nvf0 (GK110+)

This fixes a crash when trying to monitor MP counters because compute
support is not implemented for nvf0.

Reported-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agodocs/relnotes: Mark off ARB_direct_state_access for 10.6
Fredrik Höglund [Thu, 7 May 2015 18:29:46 +0000 (20:29 +0200)]
docs/relnotes: Mark off ARB_direct_state_access for 10.6

v2: Make it clear that ARB_direct_state_access is only available on
    drivers that support GL 2.0+

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agodocs: Update the ARB_direct_state_access status
Fredrik Höglund [Thu, 7 May 2015 18:29:21 +0000 (20:29 +0200)]
docs: Update the ARB_direct_state_access status

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agost/mesa: Enable ARB_direct_state_access
Fredrik Höglund [Sun, 10 May 2015 19:06:52 +0000 (21:06 +0200)]
st/mesa: Enable ARB_direct_state_access

Assume that all drivers that advertise support for NPOT textures
are able to support GL 2.0.

v2: Add a comment.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agoi965: Enable ARB_direct_state_access
Fredrik Höglund [Sun, 10 May 2015 19:05:11 +0000 (21:05 +0200)]
i965: Enable ARB_direct_state_access

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agoi915: Enable ARB_direct_state_access
Fredrik Höglund [Sun, 10 May 2015 19:04:22 +0000 (21:04 +0200)]
i915: Enable ARB_direct_state_access

This extension requires OpenGL 2.0, so enable it on gen3 and later.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in query object functions
Fredrik Höglund [Sun, 10 May 2015 18:57:29 +0000 (20:57 +0200)]
mesa: Add ARB_direct_state_access checks in query object functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in program pipeline functions
Fredrik Höglund [Sun, 10 May 2015 18:56:18 +0000 (20:56 +0200)]
mesa: Add ARB_direct_state_access checks in program pipeline functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in sampler object functions
Fredrik Höglund [Sun, 10 May 2015 18:55:31 +0000 (20:55 +0200)]
mesa: Add ARB_direct_state_access checks in sampler object functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in VAO functions
Fredrik Höglund [Sun, 10 May 2015 18:54:18 +0000 (20:54 +0200)]
mesa: Add ARB_direct_state_access checks in VAO functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in texture functions
Fredrik Höglund [Sun, 10 May 2015 18:52:49 +0000 (20:52 +0200)]
mesa: Add ARB_direct_state_access checks in texture functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in renderbuffer functions
Fredrik Höglund [Sun, 10 May 2015 18:49:15 +0000 (20:49 +0200)]
mesa: Add ARB_direct_state_access checks in renderbuffer functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in FBO functions
Fredrik Höglund [Sun, 10 May 2015 18:48:11 +0000 (20:48 +0200)]
mesa: Add ARB_direct_state_access checks in FBO functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in buffer object functions
Fredrik Höglund [Sun, 10 May 2015 18:46:36 +0000 (20:46 +0200)]
mesa: Add ARB_direct_state_access checks in buffer object functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add ARB_direct_state_access checks in XFB functions
Fredrik Höglund [Sun, 10 May 2015 18:44:07 +0000 (20:44 +0200)]
mesa: Add ARB_direct_state_access checks in XFB functions

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Make GL_TEXTURE_CUBE_MAP valid in FramebufferTextureLayer
Fredrik Höglund [Wed, 29 Apr 2015 17:44:06 +0000 (19:44 +0200)]
mesa: Make GL_TEXTURE_CUBE_MAP valid in FramebufferTextureLayer

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomesa: Add an extension flag for ARB_direct_state_access
Fredrik Höglund [Sun, 10 May 2015 18:34:03 +0000 (20:34 +0200)]
mesa: Add an extension flag for ARB_direct_state_access

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
9 years agomain: Add entry point for NamedFramebufferDrawBuffers.
Laura Ekstrand [Mon, 9 Feb 2015 22:08:00 +0000 (14:08 -0800)]
main: Add entry point for NamedFramebufferDrawBuffers.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor DrawBuffers.
Laura Ekstrand [Mon, 9 Feb 2015 21:33:13 +0000 (13:33 -0800)]
main: Refactor DrawBuffers.

This could have added a new DD table entry for DrawBuffers that takes an
arbitrary draw buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access.  The DD implementations for DrawBuffer(s)
have limited functionality, especially with respect to
ARB_direct_state_access.

[Fredrik: Call the driver function when fb is the bound draw buffer]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point for NamedFramebufferReadBuffer.
Laura Ekstrand [Fri, 6 Feb 2015 23:36:52 +0000 (15:36 -0800)]
main: Add entry point for NamedFramebufferReadBuffer.

[Fredrik: Fix the name of the buf parameter in the XML file]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_ReadBuffer.
Laura Ekstrand [Fri, 6 Feb 2015 23:23:05 +0000 (15:23 -0800)]
main: Refactor _mesa_ReadBuffer.

This could have added a new DD table entry for ReadBuffer that takes an
arbitrary read buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access.  The DD implementations for ReadBuffer
have limited functionality, especially with respect to
ARB_direct_state_access.

[Fredrik: Call the driver function when fb is the bound read buffer]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point for NamedFramebufferDrawBuffer.
Laura Ekstrand [Fri, 6 Feb 2015 22:44:43 +0000 (14:44 -0800)]
main: Add entry point for NamedFramebufferDrawBuffer.

[Fredrik: Fix the name of the buf parameter in the XML file]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_DrawBuffer.
Laura Ekstrand [Fri, 6 Feb 2015 18:57:57 +0000 (10:57 -0800)]
main: Refactor _mesa_DrawBuffer.

This could have added a new DD table entry for DrawBuffer that takes an
arbitrary draw buffer, but, after looking at the existing DD functions,
Kenneth Graunke recommended that we just skip calling the DD functions in the
case of ARB_direct_state_access.  The DD implementations for DrawBuffer(s)
have limited functionality, especially with respect to
ARB_direct_state_access.

[Fredrik: Call the driver function when fb is the bound draw buffer]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_drawbuffers.
Laura Ekstrand [Fri, 6 Feb 2015 18:34:24 +0000 (10:34 -0800)]
main: Refactor _mesa_drawbuffers.

[Fredrik: Whitespace fix]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add stubs for [Get]NamedFramebufferParameteri[v].
Laura Ekstrand [Fri, 6 Feb 2015 00:38:11 +0000 (16:38 -0800)]
main: Add stubs for [Get]NamedFramebufferParameteri[v].

The ARB_direct_state_access specification says (as of 2015.02.05):
   "Interactions with OpenGL 4.3 or ARB_framebuffer_no_attachments

       If neither OpenGL 4.3 nor ARB_framebuffer_no_attachments are supported,
       ignore the support for NamedFramebufferParameteri and
       GetNamedFramebufferParameteriv."

This commit adds stubs for these entry points.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fake entry point for glClearNamedFramebufferfi.
Laura Ekstrand [Thu, 5 Feb 2015 21:43:12 +0000 (13:43 -0800)]
main: Fake entry point for glClearNamedFramebufferfi.

Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model.  Moreover, the OpenGL spec for ClearBuffer is also very
complicated.  At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fake entry point for glClearNamedFramebufferfv.
Laura Ekstrand [Thu, 5 Feb 2015 21:38:39 +0000 (13:38 -0800)]
main: Fake entry point for glClearNamedFramebufferfv.

Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model.  Moreover, the OpenGL spec for ClearBuffer is also very
complicated.  At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fake entry point for glClearNamedFramebufferuiv.
Laura Ekstrand [Thu, 5 Feb 2015 21:30:50 +0000 (13:30 -0800)]
main: Fake entry point for glClearNamedFramebufferuiv.

Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model.  Moreover, the OpenGL spec for ClearBuffer is also very
complicated.  At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fake entry point for glClearNamedFramebufferiv.
Laura Ekstrand [Thu, 5 Feb 2015 21:24:43 +0000 (13:24 -0800)]
main: Fake entry point for glClearNamedFramebufferiv.

Mesa's ClearBuffer framework is very complicated and thoroughly married to the
object binding model.  Moreover, the OpenGL spec for ClearBuffer is also very
complicated.  At some point, we should implement buffer clearing for arbitrary
framebuffer objects, but for now, we will just wrap ClearBuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry points for InvalidateNamedFramebuffer[Sub]Data.
Laura Ekstrand [Wed, 4 Feb 2015 22:21:48 +0000 (14:21 -0800)]
main: Add entry points for InvalidateNamedFramebuffer[Sub]Data.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor invalidate_framebuffer_storage.
Laura Ekstrand [Wed, 4 Feb 2015 17:49:58 +0000 (09:49 -0800)]
main: Refactor invalidate_framebuffer_storage.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Complete error conditions for glInvalidate*Framebuffer.
Laura Ekstrand [Wed, 4 Feb 2015 22:21:17 +0000 (14:21 -0800)]
main: Complete error conditions for glInvalidate*Framebuffer.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
9 years agomain: _mesa_blit_framebuffer updates its arbitrary framebuffers.
Laura Ekstrand [Tue, 3 Feb 2015 22:47:00 +0000 (14:47 -0800)]
main: _mesa_blit_framebuffer updates its arbitrary framebuffers.

Previously, we used _mesa_update_state to update the currently bound
framebuffers prior to performing a blit.  Now that _mesa_blit_framebuffer
uses arbitrary framebuffers, _mesa_update_state is not specific enough.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point for BlitNamedFramebuffer.
Laura Ekstrand [Tue, 3 Feb 2015 00:27:46 +0000 (16:27 -0800)]
main: Add entry point for BlitNamedFramebuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_update_draw_buffer_bounds.
Laura Ekstrand [Tue, 3 Feb 2015 22:41:26 +0000 (14:41 -0800)]
main: Refactor _mesa_update_draw_buffer_bounds.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_get_clamp_read_color.
Laura Ekstrand [Tue, 3 Mar 2015 23:05:16 +0000 (15:05 -0800)]
main: Refactor _mesa_get_clamp_read_color.

This wasn't neccessary for ARB_direct_state_access, but felt like a good idea
for the sake of completeness.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_[update|get]_clamp_fragment_color.
Laura Ekstrand [Tue, 3 Mar 2015 22:03:33 +0000 (14:03 -0800)]
main: Refactor _mesa_[update|get]_clamp_fragment_color.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_[update|get]_clamp_vertex_color.
Laura Ekstrand [Tue, 3 Feb 2015 19:42:17 +0000 (11:42 -0800)]
main: Refactor _mesa_[update|get]_clamp_vertex_color.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor _mesa_update_framebuffer.
Laura Ekstrand [Tue, 3 Feb 2015 19:03:01 +0000 (11:03 -0800)]
main: Refactor _mesa_update_framebuffer.

_mesa_update_framebuffer now operates on arbitrary read and draw framebuffers.
This allows BlitNamedFramebuffer to update the state of its arbitrary read and
draw framebuffers.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor glBlitFramebuffer.
Laura Ekstrand [Tue, 3 Feb 2015 00:17:47 +0000 (16:17 -0800)]
main: Refactor glBlitFramebuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fix whitespace in blit.c
Laura Ekstrand [Tue, 3 Feb 2015 00:18:11 +0000 (16:18 -0800)]
main: Fix whitespace in blit.c

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point GetNamedFramebufferAttachmentParameteriv.
Laura Ekstrand [Fri, 30 Jan 2015 01:11:37 +0000 (17:11 -0800)]
main: Add entry point GetNamedFramebufferAttachmentParameteriv.

[Fredrik: - Update one of the error messages to reflect that the
            framebuffer might not be the bound framebuffer.
          - Whitespace fixes.]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point for CheckNamedFramebufferStatus.
Laura Ekstrand [Thu, 29 Jan 2015 21:15:37 +0000 (13:15 -0800)]
main: Add entry point for CheckNamedFramebufferStatus.

[Fredrik: - Retain the debugging code in CheckFramebufferStatus.
          - Whitespace fixes.]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fix indents in former get_texture_for_framebuffer functions.
Laura Ekstrand [Tue, 3 Mar 2015 00:52:55 +0000 (16:52 -0800)]
main: Fix indents in former get_texture_for_framebuffer functions.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Major refactor of get_texture_for_framebuffer.
Laura Ekstrand [Tue, 3 Mar 2015 00:48:59 +0000 (16:48 -0800)]
main: Major refactor of get_texture_for_framebuffer.

This splits off the (still) rather large chunk that is
get_texture_for_framebuffer into lots of smaller functions specialized to
service the wide variety of unique needs of *FramebufferTexture* entry points.
The result is much cleaner because, rather than having a pile of branches and
confusing conditions (like the boolean layered), the uniqueness is baked into
the entry points. The entry points know whether or not they are layered or use
a textarget.

[Fredrik: - Mention the value of <textarget> in the error message.
          - Rename check_zoffset to check_layer, and zoffset to layer.
            The zoffset parameter was renamed to layer in
            ARB_framebuffer_object.
          - Make layered a GLboolean since the value is visible to the API.
          - Remove EXT suffixes in refactored code.
          - Whitespace fixes.]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry points for glNamedFramebufferTexture[Layer].
Laura Ekstrand [Wed, 28 Jan 2015 21:19:57 +0000 (13:19 -0800)]
main: Add entry points for glNamedFramebufferTexture[Layer].

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fix indentation in get_texture_for_framebuffer.
Laura Ekstrand [Mon, 2 Mar 2015 21:43:09 +0000 (13:43 -0800)]
main: Fix indentation in get_texture_for_framebuffer.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Refactor get_texture_for_framebuffer.
Laura Ekstrand [Mon, 2 Mar 2015 21:41:13 +0000 (13:41 -0800)]
main: Refactor get_texture_for_framebuffer.

This moves a few blocks around so that the control flow is more obvious.  If
the texture is 0, just return true at the beginning of the function.
Likewise, if the texObj is NULL, return true at the beginning of the function
as well.

[Fredrik: Fix the texObj NULL check]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Split framebuffer_texture.
Laura Ekstrand [Wed, 28 Jan 2015 00:11:52 +0000 (16:11 -0800)]
main: Split framebuffer_texture.

Split apart utility function framebuffer_texture to better prepare for
implementing NamedFramebufferTexture and NamedFramebufferTextureLayer.  This
should also pave the way for some future cleanup work.

[Fredrik: - Mention which limit was exceeded when <layer> is out of range.
          - Update a comment to reflect that <fb> might not be the bound
            framebuffer.
          - Make it clear that the error message in glFramebufferTexture*D
            refers to the <textarget> parameter.
          - Remove EXT suffixes.]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Fix an error generated by FramebufferTexture
Laura Ekstrand [Mon, 20 Apr 2015 15:21:20 +0000 (17:21 +0200)]
main: Fix an error generated by FramebufferTexture

gl*FramebufferTexture should generate GL_INVALID_VALUE when the
texture doesn't exist.

[Fredrik: Split this change out from the next commit]

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
9 years agomesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0
Fredrik Höglund [Sat, 9 May 2015 13:31:45 +0000 (15:31 +0200)]
mesa: Generate GL_INVALID_VALUE in framebuffer_texture when layer < 0

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
9 years agomain: Require that the texture exists in framebuffer_texture
Fredrik Höglund [Thu, 7 May 2015 18:28:23 +0000 (20:28 +0200)]
main: Require that the texture exists in framebuffer_texture

Generate GL_INVALID_OPERATION if the texture hasn't been created.

Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
9 years agomain: Fix the indentation in framebuffer_texture
Laura Ekstrand [Tue, 27 Jan 2015 22:11:13 +0000 (14:11 -0800)]
main: Fix the indentation in framebuffer_texture

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add entry point for NamedFramebufferRenderbuffer.
Laura Ekstrand [Sat, 28 Feb 2015 01:27:30 +0000 (17:27 -0800)]
main: Add entry point for NamedFramebufferRenderbuffer.

[Fredrik: - Remove the DummyRenderbuffer checks now that they are
            done in _mesa_lookup_renderbuffer_err.
          - Fix the <renderbuffertarget> name in error messages.
          - Make the error message in _mesa_framebuffer_renderbuffer
            reflect that <fb> might not be the bound framebuffer.
          - Remove EXT suffixes from GL tokens.]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Rename framebuffer renderbuffer software fallback.
Laura Ekstrand [Sat, 28 Feb 2015 01:23:59 +0000 (17:23 -0800)]
main: Rename framebuffer renderbuffer software fallback.

Rename _mesa_framebuffer_renderbuffer to _mesa_FramebufferRenderbuffer_sw in
preparation for adding the ARB_direct_state_access backend function for
FramebufferRenderbuffer and NamedFramebufferRenderbuffer to share.

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add utility function _mesa_lookup_renderbuffer_err.
Laura Ekstrand [Sat, 24 Jan 2015 00:38:36 +0000 (16:38 -0800)]
main: Add utility function _mesa_lookup_renderbuffer_err.

[Fredrik: Generate an error for non-existent renderbuffers]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add glCreateFramebuffers.
Laura Ekstrand [Fri, 23 Jan 2015 22:54:48 +0000 (14:54 -0800)]
main: Add glCreateFramebuffers.

[Fredrik: Whitespace fixes]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agomain: Add utility function _mesa_lookup_framebuffer_err.
Laura Ekstrand [Thu, 22 Jan 2015 18:23:35 +0000 (10:23 -0800)]
main: Add utility function _mesa_lookup_framebuffer_err.

[Fredrik: Generate an error for non-existent framebuffers]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
9 years agosoftpipe: enable ARB_texture_view
Roland Scheidegger [Wed, 13 May 2015 20:56:07 +0000 (22:56 +0200)]
softpipe: enable ARB_texture_view

Some bits were already there for texture views but some were missing.
In particular for cube map views things needed to change a bit.
For simplicity I ended up removing the separate face addr bit (just use
the z bit) - cube arrays didn't use it already, so just follow the same
logic there. (In theory using separate bits could allow for better hash
function but I don't think anyone ever did some measurements of that so
probably not worth the trouble, if we'd reintroduce it we'd certainly
wanted to use the same logic for cube arrays and cube maps.)
Also extend the seamless cube sampling to cube arrays - as there were no
piglit failures before this is apparently untested, but things now generally
work quite the same for cube textures and cube array textures so there
hopefully shouldn't be any trouble...

49 new piglits, 47 pass, 2 fail (both due to fake multisampling).

v2: incorporate Brian's feedback, add sampler view validation,
function rename, formatting fixes.

Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agollvmpipe: enable ARB_texture_view
Roland Scheidegger [Wed, 13 May 2015 20:16:44 +0000 (22:16 +0200)]
llvmpipe: enable ARB_texture_view

All the functionality was pretty much there, just not tested.
Trivially fix up the missing pieces (take target info from view not
resource), and add some missing bits for cubes.
Also add some minimal debug validation to detect uninitialized target values
in the view...

49 new piglits, 47 pass, 2 fail (both related to fake multisampling,
not texture_view itself). No other piglit changes.

v2: move sampler view validation to sampler view creation, update docs.

Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agogallium/util: fix blitter sampler view target initialization
Roland Scheidegger [Tue, 12 May 2015 15:27:59 +0000 (17:27 +0200)]
gallium/util: fix blitter sampler view target initialization

This was missing, and drivers relying on the target in the view could get
into quite some trouble.

Signed-off-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
9 years agoglapi/hgl: Drop extern "C" as it was added to glapi
Alexander von Gluck IV [Wed, 13 May 2015 18:22:57 +0000 (14:22 -0400)]
glapi/hgl: Drop extern "C" as it was added to glapi

Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agoglapi: Add extern "C" to glapi_priv.h
Alexander von Gluck IV [Wed, 13 May 2015 18:22:00 +0000 (14:22 -0400)]
glapi: Add extern "C" to glapi_priv.h

* The Haiku glapi has a C++ wrapper around the dispatch code.

Reviewed-by: Brian Paul <brianp@vmware.com>
9 years agogallium/st + hgl: Build fixes for Haiku
Alexander von Gluck IV [Wed, 13 May 2015 14:40:01 +0000 (09:40 -0500)]
gallium/st + hgl: Build fixes for Haiku

* No impact risk to any other platforms
* Tracing printf needs stdio.h now due to child header change
* Add missing #/src include directory for util/macros.h

9 years agoi965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().
Francisco Jerez [Sat, 31 Jan 2015 18:04:55 +0000 (20:04 +0200)]
i965: Fix PBO cache coherency issue after _mesa_meta_pbo_GetTexSubImage().

This problem can easily be reproduced with a number of
ARB_shader_image_load_store piglit tests, which use a buffer object as
PBO for a pixel transfer operation and later on bind the same buffer
to the pipeline as shader image -- The problem is not exclusive to
images though, and is likely to affect other kinds of buffer objects
that can be bound to the 3D pipeline, including vertex, index,
uniform, atomic counter buffers, etc.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
9 years agoi965/fs: set execution size to 8 with simd8 ddy instruction
Tapani Pälli [Tue, 12 May 2015 11:24:08 +0000 (14:24 +0300)]
i965/fs: set execution size to 8 with simd8 ddy instruction

Commit dd5c825 changed the way how execution size for instructions
get set. Previously it was based on destination register width, now
it is set explicitly when emitting instructions.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90258

9 years agoi965/cs: drop explicit initialisers in C++ file
Dave Airlie [Tue, 12 May 2015 23:59:59 +0000 (09:59 +1000)]
i965/cs: drop explicit initialisers in C++ file

gcc 4.4.7 really doesn't like them, and they aren't standard
C++, they seem to be a gcc extension.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
9 years agonouveau: document nouveau_heap
Ilia Mirkin [Tue, 12 May 2015 22:58:17 +0000 (18:58 -0400)]
nouveau: document nouveau_heap

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
9 years agonvc0: switch mechanism for shader eviction to be a while loop
Ilia Mirkin [Sun, 10 May 2015 05:57:56 +0000 (01:57 -0400)]
nvc0: switch mechanism for shader eviction to be a while loop

This aligns it to work similarly to nv50. However there's no library
code there, so the whole thing can be freed. Here we end up with an
allocated node that's not attached to a specific program.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=86792
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
9 years agost/mesa: update stencil surface if it comes from texture
Ilia Mirkin [Fri, 24 Apr 2015 23:17:11 +0000 (19:17 -0400)]
st/mesa: update stencil surface if it comes from texture

Now that ARB_texture_stencil8 is supported, this might happen.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Dave Airlie <airlied@redhat.com>
9 years agoradeonsi: add new bonaire pci id
Alex Deucher [Tue, 12 May 2015 17:13:05 +0000 (13:13 -0400)]
radeonsi: add new bonaire pci id

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
9 years agost/mesa: translate st_api robustness flags to gl_context flags
Marek Olšák [Wed, 29 Apr 2015 15:54:26 +0000 (17:54 +0200)]
st/mesa: translate st_api robustness flags to gl_context flags

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agost/dri: add support for create_context_robustness GLX and EGL extensions
Marek Olšák [Wed, 29 Apr 2015 15:52:02 +0000 (17:52 +0200)]
st/dri: add support for create_context_robustness GLX and EGL extensions

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agost/mesa: implement GetGraphicsResetStatus
Marek Olšák [Wed, 29 Apr 2015 13:05:19 +0000 (15:05 +0200)]
st/mesa: implement GetGraphicsResetStatus

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agogallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY
Marek Olšák [Wed, 29 Apr 2015 13:44:55 +0000 (15:44 +0200)]
gallium: add PIPE_CAP_DEVICE_RESET_STATUS_QUERY

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agogallium: add an interface for querying a device reset status
Marek Olšák [Wed, 29 Apr 2015 13:04:34 +0000 (15:04 +0200)]
gallium: add an interface for querying a device reset status

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoclover: Implement locking of the wait_count, _chain and _status members of event.
Francisco Jerez [Sat, 9 May 2015 13:01:23 +0000 (16:01 +0300)]
clover: Implement locking of the wait_count, _chain and _status members of event.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
9 years agoclover: Wrap event::_status in a method to prevent unlocked access.
Francisco Jerez [Sat, 9 May 2015 13:22:33 +0000 (16:22 +0300)]
clover: Wrap event::_status in a method to prevent unlocked access.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
9 years agoclover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.
Francisco Jerez [Sat, 9 May 2015 11:47:38 +0000 (14:47 +0300)]
clover: Refactor event::trigger and ::abort to prevent deadlock and reentrancy issues.

Refactor ::trigger and ::abort to split out the operations that access
concurrently modified data members and require locking from the
recursive and possibly re-entrant part of these methods.  This will
avoid some deadlock situations when locking is implemented.

Tested-by: Tom Stellard <thomas.stellard@amd.com>
CC: 10.5 <mesa-stable@lists.freedesktop.org>
9 years agonir: Translate memory barrier intrinsics from GLSL IR.
Francisco Jerez [Tue, 5 May 2015 20:10:56 +0000 (23:10 +0300)]
nir: Translate memory barrier intrinsics from GLSL IR.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agonir: Translate image load, store and atomic intrinsics from GLSL IR.
Francisco Jerez [Tue, 5 May 2015 20:04:46 +0000 (23:04 +0300)]
nir: Translate image load, store and atomic intrinsics from GLSL IR.

v2: Undefine coordinate components not applicable to the target.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agonir: Fix indexing of atomic counter arrays with a constant value.
Francisco Jerez [Tue, 5 May 2015 20:02:05 +0000 (23:02 +0300)]
nir: Fix indexing of atomic counter arrays with a constant value.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agonir: Add memory barrier intrinsic.
Francisco Jerez [Tue, 5 May 2015 20:00:51 +0000 (23:00 +0300)]
nir: Add memory barrier intrinsic.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agonir: Define image load, store and atomic intrinsics.
Francisco Jerez [Tue, 5 May 2015 19:58:39 +0000 (22:58 +0300)]
nir: Define image load, store and atomic intrinsics.

v2: Undefine coordinate components not applicable to the target.

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi965/fs: Have component() set the register stride to zero.
Francisco Jerez [Thu, 30 Apr 2015 16:29:54 +0000 (19:29 +0300)]
i965/fs: Have component() set the register stride to zero.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi965/fs: Fix offset() for registers with zero stride.
Francisco Jerez [Wed, 22 Apr 2015 11:46:17 +0000 (14:46 +0300)]
i965/fs: Fix offset() for registers with zero stride.

stride == 0 implies that the register has one channel per vector
component.

Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agoi965: Don't forget the force_sechalf flag in lower_load_payload().
Francisco Jerez [Thu, 7 May 2015 16:33:57 +0000 (19:33 +0300)]
i965: Don't forget the force_sechalf flag in lower_load_payload().

Regression from commit 41868bb6824c6106a55c8442006c1e2215abf567.
Fixes a bunch of ARB_shader_image_load_store tests.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
9 years agoi965: Document brw_mask_reg().
Francisco Jerez [Wed, 6 May 2015 14:37:12 +0000 (17:37 +0300)]
i965: Document brw_mask_reg().

Reviewed-by: Matt Turner <mattst88@gmail.com>
9 years agonir: fix sampler lowering pass for arrays
Tapani Pälli [Mon, 11 May 2015 11:50:19 +0000 (14:50 +0300)]
nir: fix sampler lowering pass for arrays

This fixes bugs with special cases where we have arrays of
structures containing samplers or arrays of samplers.

I've verified that patch results in calculating same index value as
returned by _mesa_get_sampler_uniform_value for IR. Patch makes
following ES3 conformance test pass:

ES3-CTS.shaders.struct.uniform.sampler_array_fragment

v2: remove unnecessary comment (Topi)
    simplify changes and the overall code (Jason)

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90114

9 years agoi965: Use predicate enable bit for conditional rendering w/o stalling
Neil Roberts [Tue, 4 Nov 2014 19:15:00 +0000 (19:15 +0000)]
i965: Use predicate enable bit for conditional rendering w/o stalling

Previously whenever a primitive is drawn the driver would call
_mesa_check_conditional_render which blocks waiting for the result of
the query to determine whether to render. On Gen7+ there is a bit in
the 3DPRIMITIVE command which can be used to disable the primitive
based on the value of a state bit. This state bit can be set based on
whether two registers have different values using the MI_PREDICATE
command. We can load these two registers with the pixel count values
stored in the query begin and end to implement conditional rendering
without stalling.

Unfortunately these two source registers were not in the whitelist of
available registers in the kernel driver until v3.19. This patch uses
the command parser version from intel_screen to detect whether to
attempt to set the predicate data registers.

The predicate enable bit is currently only used for drawing 3D
primitives. For blits, clears, bitmaps, copypixels and drawpixels it
still causes a stall. For most of these it would probably just work to
call the new brw_check_conditional_render function instead of
_mesa_check_conditional_render because they already work in terms of
rendering primitives. However it's a bit trickier for blits because it
can use the BLT ring or the blorp codepath. I think these operations
are less useful for conditional rendering than rendering primitives so
it might be best to leave it for a later patch.

v2: Use the command parser version to detect whether we can write to
    the predicate data registers instead of trying to execute a
    register load command.
v3: Simple rebase
v4: Changes suggested by Kenneth Graunke: Split the
    load_64bit_register function out to a separate patch so it can be
    a shared public function. Avoid calling
    _mesa_check_conditional_render if we've already determined that
    there's no query object. Some styling fixes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi956: Add a function to load a 64-bit register from a buffer
Neil Roberts [Mon, 11 May 2015 13:00:42 +0000 (14:00 +0100)]
i956: Add a function to load a 64-bit register from a buffer

Adds brw_load_register_mem64 which is similar to brw_load_register_mem
except that it queues two GEN7_MI_LOAD_REGISTER_MEM commands in order
to load both halves of a 64-bit register. The function is implemented
by splitting the 32-bit version into an internal helper function which
takes a size.

This will later be used to set the 64-bit predicate source registers.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agoi965: Store the command parser version number in intel_screen
Neil Roberts [Fri, 7 Nov 2014 18:20:17 +0000 (18:20 +0000)]
i965: Store the command parser version number in intel_screen

In order to detect whether the predicate source registers can be used
in a later patch we will need to know the version number for the
command parser. This patch just adds a member to intel_screen and does
an ioctl to get the version.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
9 years agodocs/GL3: (trivial) mark some tf extensions as done for softpipe/llvmpipe
Roland Scheidegger [Tue, 12 May 2015 02:48:48 +0000 (04:48 +0200)]
docs/GL3: (trivial) mark some tf extensions as done for softpipe/llvmpipe

Those extensions were enabled for ages already.

9 years agodocs: add news item and link release notes for mesa 10.5.5
Emil Velikov [Mon, 11 May 2015 21:07:46 +0000 (22:07 +0100)]
docs: add news item and link release notes for mesa 10.5.5

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agodocs: Add sha256 sums for the 10.5.5 release
Emil Velikov [Mon, 11 May 2015 21:02:03 +0000 (22:02 +0100)]
docs: Add sha256 sums for the 10.5.5 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit 8ee1a1c08b168d7583b806a2f8a2dc2ae28be62a)

9 years agoAdd release notes for the 10.5.5 release
Emil Velikov [Mon, 11 May 2015 19:19:33 +0000 (20:19 +0100)]
Add release notes for the 10.5.5 release

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
(cherry picked from commit d88fb4050561a62fa824bec59ffedf2a826c2083)

9 years agost/mesa: make sure to create a "clean" bool when doing i2b
Ilia Mirkin [Thu, 7 May 2015 03:29:33 +0000 (23:29 -0400)]
st/mesa: make sure to create a "clean" bool when doing i2b

i2b has to work for all integers, not just 1. INEG would not necessarily
result with all bits set, which is something that other operations can
rely on by e.g. using AND (or INEG for b2i).

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
9 years agoclover: Fix a bug with multi-threaded events v2
Tom Stellard [Thu, 26 Mar 2015 19:33:24 +0000 (19:33 +0000)]
clover: Fix a bug with multi-threaded events v2

It was possible for some events never to get triggered if one thread
was creating events and another threads was waiting for them.

This patch consolidates soft_event::wait() and hard_event::wait()
into event::wait() so that hard_event objects will now wait for
all their dependencies to be submitted before flushing the command
queue.

v2:
  - Rename variables
  - Use mutable varibales so we can keep event::wait() const
  - Open code signalled() call so mutex can be atted to signalled
    without deadlocking.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
9 years agoclover: Add a mutex to guard queue::queued_events
Tom Stellard [Thu, 7 May 2015 13:57:14 +0000 (13:57 +0000)]
clover: Add a mutex to guard queue::queued_events

This fixes a potential crash where on a sequence like this:

Thread 0: Check if queue is not empty.
Thread 1: Remove item from queue, making it empty.
Thread 0: Do something assuming queue is not empty.

CC: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
9 years agoi965/fs: Add missing initializer in fs_visitor().
Matt Turner [Mon, 11 May 2015 17:46:59 +0000 (10:46 -0700)]
i965/fs: Add missing initializer in fs_visitor().