Commit Graph

68574 Commits

Author SHA1 Message Date
Jose Fonseca 5564c361b5 st/egl: Remove.
Largely superseeded by src/egl, and
WGL/GLX_EXT_create_context_es_profile extensions.

Note this will break Android.mk with gallium drivers -- somebody
familiar with that build infrastructure will need to update it to use
gallium drivers through egl_dri2.

v2: Remove the _EGL_BUILT_IN_DRIVER_GALLIUM define from
src/egl/main/Android.mk; and update the src/egl/main/Sconscript to
create a SharedLibrary, add versioning, create symlink - copy the bits
from egl-static, per Emil Velikov.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

v3: Disallow undefined symbols in libEGL.so.  Update release notes
2015-03-04 11:01:42 +00:00
Jose Fonseca 17b2825d76 windows/gdi: Remove.
This classic driver is so far behind Gallium softpipe/llvmpipe based
one, that's hard to imagine ever being useful.

v2: Drop drivers/windows from src/mesa/Makefile.am:EXTRA_DIST per Emil
Velikov.

Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

v3: Update release notes.
2015-03-04 11:01:38 +00:00
Jose Fonseca 40a4797384 nir: Use helper macros for dealing with VLAs.
v2:
- Single statement, by using memset return value as suggested by Ian
Romanick.
- No internal declaration, as suggested by Jason Ekstrand.
- Move macros to a header.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-03-04 10:52:02 +00:00
Marc-Andre Lureau 073a5d2e84 gallium/auxiliary/indices: fix start param
Since commit 28f3f8d, indices generator take a start parameter. However, some
index values have been left to start at 0.

This fixes the glean/fbo test with the virgl driver, and copytexsubimage
with freedreno.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.4 10.5" <mesa-stable@lists.freedesktop.org>
2015-03-04 00:15:22 -05:00
Vinson Lee b77576edc1 scons: Define _DEFAULT_SOURCE.
Fix GCC cpp warnings with glibc >= 2.19.

/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
 # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
   ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Acked-by: Emil Velikov <emil.l.velikov@gmail.com>
2015-03-03 17:23:48 -08:00
Frank Henigman e43729943e intel: fix EGLImage renderbuffer _BaseFormat
Correctly set _BaseFormat field when creating a gl_renderbuffer
with EGLImage storage.

Change-Id: I8c9f7302d18b617f54fa68304d8ffee087ed8a77
Signed-off-by: Frank Henigman <fjhenigman@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Chad Versace <chad.versace@intel.com>
2015-03-03 10:58:42 -08:00
Rob Clark 8e67fd798e freedreno/a4xx: re-enable int (conditional on glsl130)
Re-enable integer, now that we can handle flat varyings.  Still, ofc,
conditional on FD_MESA_DEBUG=glsl130, until we can deprecate _old
compiler..

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Rob Clark e9f2abe349 freedreno/ir3: handle flat bypass for a4xx
We may not need this for later a4xx patchlevels, but we do at least need
this for patchlevel 0.  Bypass bary.f for fetching varyings when flat
shading is needed (rather than configure via cmdstream).  This requires
a special dummy bary.f w/ (ei) flag to signal to scheduler when all
varyings are consumed.  And requires shader variants based on rasterizer
flatshade state to handle TGSI_INTERPOLATE_COLOR.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Rob Clark 9d732d3125 freedreno/ir3: add support for memory (cat6) instructions
Scheduled basically the same as texture (cat5) instructions, using (sy)
flag for synchronization.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Rob Clark 20b50a0712 freedreno/ir3: fix up cat6 instruction encodings
I think there is at least one more sub-encoding, but these two should be
enough to cover the common load/store instructions.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Rob Clark 4abb789bca tgsi/lowering: don't forget interp for BCOLOR inputs
To lower two sided color, tgsi_lowering creates additional BCOLOR inputs
(matching up to the BCOLOR outputs on the vert shader).  These inputs
should copy the interpolation state of their matching COLOR input.

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Rob Clark 583a8a8f65 freedreno/a3xx,a4xx: silence some warnings
fd3_emit.c: In function ‘fd3_emit_vertex_bufs’:
  fd3_emit.c:377:11: warning: unused variable ‘semantic’ [-Wunused-variable]
     uint8_t semantic = sem2name(vp->inputs[i].semantic);

and

  fd4_emit.c: In function ‘fd4_emit_vertex_bufs’:
  fd4_emit.c:304:11: warning: unused variable ‘semantic’ [-Wunused-variable]
     uint8_t semantic = sem2name(vp->inputs[i].semantic);

Signed-off-by: Rob Clark <robclark@freedesktop.org>
2015-03-03 10:41:00 -05:00
Brian Paul 5ece288876 c99_alloca.h: add case for __sun
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-03-03 08:40:13 -07:00
Jose Fonseca 80c5bd7ef0 configure: Leverage gcc warn options to enable safe use of C99 features where possible.
The main objective of this change is to enable Linux developers to use
more of C99 throughout Mesa, with confidence that the portions that need
to be built with MSVC -- and only those portions --, stay portable.

This is achieved by using the appropriate -Werror= options only on the
places they need to be used.

Unfortunately we still need MSVC 2008 on a few portions of the code
(namely llvmpipe and its dependencies).  I hope to eventually eliminate
this so that we can use C99 everywhere, but there are technical/logistic
challenges (specifically, newer Windows SDKs no longer bundle MSVC,
instead require a full installation of Visual Studio, and that has
hindered adoption of newer MSVC versions on our build processes.)
Thankfully we have more directy control over our OpenGL driver, which is
why we're now able to migrate to MSVC 2013 for most of the tree.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-03-03 09:25:11 +00:00
Ben Widawsky 3d4d77a5dc i965: Fix assertion in brw_reg_type_letters
While using various debugging features (optimization debug, instruction dumping,
etc) this function is called in order to get a readable letter for the type of
unit.

On GEN8, two new units were added, the Qword and the Unsigned Qword (Q, and UQ
respectively). The existing assertion tries to determine that the argument
passed in is within the correct boundary, however, it was using UQ as the upper
limit instead of Q.

To my knowledge you can only hit this case with the branch I am currently
working on, so it doesn't fix any known issues.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 19:55:20 -08:00
Ben Widawsky 37c2687645 i965: Rename some PIPE_CONTROL flags
I'm not really sure of the origins of the existing flag names. Modern docs have
some slightly different names. Having the correct names makes it easier to
determine if existing PIPE_CONTROL flag settings are correct, as well as making
adding new PIPE_CONTROLs easier.

This originally came up while I was trying to implement workarounds and spotted
some things called, "flush" which should have been called "invalidate."

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-03-02 19:28:43 -08:00
Matt Turner e214000f25 i965/fs: Don't use backend_visitor::instructions after creating the CFG.
This is a fix for a regression introduced in commit a9f8296d ("i965/fs:
Preserve the CFG in a few more places.").

The errata this code works around is described in a comment before the function:

   "[DevBW, DevCL] Errata: A destination register from a send can not be
    used as a destination register until after it has been sourced by an
    instruction with a different destination register.

The framebuffer write's sources must be in message registers, which SEND
instructions cannot have as a destination. There's no way for this
errata to affect anything at the end of the program. Just remove the
code.

Cc: 10.4, 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84613
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-03-02 18:13:28 -08:00
Jason Ekstrand c4925d7f3b main/base_tex_format: Properly handle STENCIL_INDEX1/4/16
This takes "fbo-stencil blit GL_STENCIL_INDEX1/4/16" from crash to pass on
BDW.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 11:06:44 -08:00
Jason Ekstrand b1ab02d9c0 meta/TexSubImage: Stash everything other than PIXEL_TRANSFER/store in meta_begin
Previously, there were bugs where if the app set a scissor it could affect
the area of the texture that was downloaded.  There was also potential that
the framebuffer SRGB state could affect downloads.  This ensures that those
will get saved/restored and can't affect the texture download.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89292
Reviewed-by: Neil Roberts <neil@linux.intel.com>
2015-03-02 11:06:37 -08:00
Matt Turner 93a8c702a6 i915: Remove hand-rolled memcpy implementation.
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-02 10:38:49 -08:00
Matt Turner 54d7925012 i965: Remove hand-rolled memcpy implementation.
Reviewed-by: Eric Anholt <eric@anholt.net>
2015-03-02 10:38:49 -08:00
Matt Turner da20bf068e i965: Consider scratch writes to have side effects.
We could do better by tracking scratch reads and writes.

Cc: 10.5 <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88793
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
2015-03-02 10:24:49 -08:00
Matt Turner 491d42135a mesa: Correct backwards NULL check.
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2015-03-02 10:24:33 -08:00
Matt Turner 87109acbed mesa: Free memory allocated for luminance in readpixels.
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-03-02 10:24:18 -08:00
Matt Turner 2b2fa18652 mesa: Indent break statements and add a missing one.
Always indenting break statements makes spotting missing ones easier.

Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
2015-03-02 10:24:16 -08:00
Vinson Lee 3de01d2fe4 c99_alloca.h: Include stdlib.h on all non-Windows.
Fix build on FreeBSD.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89364
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Tested-by: Brian Paul <brianp@vmware.com>
2015-03-02 09:26:36 -07:00
Brian Paul 6f0e9c2e39 mesa: remove extra definition of ARRAY_SIZE in src/mesa/main/macros.h
Already defined in src/util/macros.h

Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:31 -07:00
Brian Paul e1437d6c0a mesa: remove the Elements() macro definition
No longer used.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:31 -07:00
Brian Paul 692bd4a1ab util: replace Elements() with ARRAY_SIZE()
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:31 -07:00
Brian Paul 6633271159 radeon: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:31 -07:00
Brian Paul 9775dbc335 r200: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul ea760c2090 nouveau: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 49a7f8c919 i965: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul b565771003 i915: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 0a77ffcd5a mapi: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul c16c719647 glsl: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 70b401029c st/dri: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 2f0143ca96 st/mesa: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul c7136ff646 mesa/program: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 16f7b77275 mesa/swrast: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul 766f5cf8f8 mesa/vbo: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul c2e130f820 mesa/main: replace Elements() with ARRAY_SIZE()
We've been using a mix of these two macros for a while now.  Let's
just use the later everywhere.  It seems to be the convention used
by other open-source projects.

Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2015-03-02 08:55:30 -07:00
Brian Paul cd6db1989a mesa: trim down #includes in api_loopback.h
Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:30 -07:00
Brian Paul 775049b6ad mesa: trim down includes of compiler.h
In some cases, glheader.h is the right #include.
Also remove some instances of struct _glapi_table declarations.

Acked-by: Matt Turner <mattst88@gmail.com>
2015-03-02 08:55:30 -07:00
Jose Fonseca fa5140bb18 scons: Fix HAVE___* definition.
These definitions must be moved before `cppdefines` is used to have effect.

Trivial.
2015-03-02 14:23:51 +00:00
Jose Fonseca 9a07435ff8 identity: Remove.
It's unmaintained, and most likely broken: I use trace driver every now
and then, and everytime I do I need to fix it up.

It's also unused: identity_screen_create is never called.

Above all, it's dead weight: if identity driver had the infrastructure
for other pass-through drivers (like trace and rbug), then it would make
sense on its own right.  But as it is implemmented, it's just another
driver to (forget) to update whenever there is a gallium interface
change.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2015-03-02 14:12:46 +00:00
Francisco Jerez 7bfbaf4a5a i965: Remove the create_raw_surface vtbl hook.
It's a wrapper around emit_buffer_surface_state with format=RAW, pitch=1,
rw=true and the remaining arguments ordered differently.  There's no point in
having a separate vtbl pointer for that.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
2015-03-02 14:33:13 +02:00
Francisco Jerez 65f9b83e05 i965: Add missing defines for render cache messages.
And remove duplicated definition of OWORD_DUAL_BLOCK_WRITE.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
2015-03-02 14:33:13 +02:00
Neil Roberts cf67ca9ffa i965/skl: Lay out a 1D miptree horizontally
On Gen9+ the 1D miptree is laid out with all of the mipmap levels in a
horizontal line.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2015-03-02 11:57:37 +00:00
Neil Roberts 0f1e86afd6 i965/skl: Lay out 3D textures the same as array textures
On Gen9+ the 3D textures use the same mipmap layout as 2D array
textures.

Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
2015-03-02 11:57:37 +00:00