Commit Graph

54746 Commits

Author SHA1 Message Date
Kenneth Graunke 121d19de92 build: Fix build on systems where /usr/bin/python isn't python 2.
configure.ac sets up a PYTHON2 variable, which is what we want
AX_PYTHON_MODULE to use (since we only use Python 2 for now).

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-22 09:05:32 -08:00
Ian Romanick 148fc6d537 mesa/es3: Apply stricter multisample blit rules for ES3.
Fixes gles3conform
framebuffer_blit_error_blitframebuffer_multisampled_read_buffer_different_origins.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-01-22 03:26:24 -05:00
Ian Romanick d7475c7966 mesa/es3: Disallow FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE query of DEPTH_STENCIL_ATTACHMENT
This error was added in the 3.0.1 update to the OpenGL ES 3.0 spec.
Fixes the updated gles3conform packed_depth_stencil_parameters test.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2013-01-22 03:26:24 -05:00
Ian Romanick 9cb64a4cb6 mesa: Don't allow blits to / from the same buffer in OpenGL ES 3.0
Fixes gles3conform test CoverageES30.  It temporarily regresses some
framebuffer_blit tests, but the failing subcases have been determined to
be invalid for OpenGL ES 3.0.

v2: Fix typo in depth (and stencil) RB checking.  Noticed by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-22 03:26:24 -05:00
Eric Anholt 85c2e99039 mesa: Remove exec thunks from the dlist.c module.
These were introduced in 2000 during a rework of the TNL module (commit
cab974cf6c), though I'm having a hard time
finding an instance there of one of these Exec functions being changed
at runtime.

Regardless, as far as I can tell now, these functions don't get changed,
by grepping for calls to SET_* to change the dispatch table (we do change
functions in GLvertexformat at runtime, but those don't overlap with
this set of functions).  Remove them and just let them be initialized to
the same functions as are in the Exec table.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:48 -08:00
Eric Anholt ab4c549378 mesa: Initially populate the display list with the exec list.
This cuts out a ton of code to make functions not set to a save_ variant
match.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:48 -08:00
Eric Anholt 7820e2dd8d mesa: Delay display list save dispatch setup until Exec is set up.
This will let us copy from the Exec dispatch to deal with our commands that
don't get compiled into display lists.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:48 -08:00
Eric Anholt be4b1664fb mesa: Make the drivers call a non-code-generated dispatch table setup.
I want to drive the Save dispatch table setup from this same function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:48 -08:00
Eric Anholt ced98f17ef mesa: Remove the size argument from _mesa_alloc_dispatch_table().
All callers are in Mesa core and all use _gloffset_COUNT, so just rely on
the already baked-in use of _gloffset_COUNT in the function.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:47 -08:00
Eric Anholt cb49016622 mesa: Remove two of the now unused ASSERT_OUTSIDE_BEGIN_END macros.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:47 -08:00
Eric Anholt a9754793da mesa: Drop manual checks for outside begin/end.
We now have a separate dispatch table for begin/end that prevent these
functions from being entered during that time.  The
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVALs are left because I don't want to
change any return values or introduce new error-only stubs at this
point.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:47 -08:00
Eric Anholt c572251417 mesa: Install a minimal dispatch table during glBegin()/glEnd().
This is a step toward getting rid of ASSERT_OUTSIDE_BEGIN_END() in Mesa.

v2: Finish create_beginend_table() comment, move loopback API init into it,
    and add a const flag. (suggestions by Brian)

Reviewed-by: Brian Paul <brianp@vmware.com> (v1)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
2013-01-21 21:26:47 -08:00
Eric Anholt 0aaf0445ba mesa: Remove the dead PrepareExecBegin() driver hook.
This was used in i965 for a while, but no more.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:47 -08:00
Eric Anholt 23916cae8e mesa: Use an early return to unindent most of vbo_exec_Begin/End().
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:46 -08:00
Eric Anholt 7b3c8b3747 mesa: Improve a glTexEnv error message by looking up the enum.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:46 -08:00
Eric Anholt 4d8f72f2bc mesa: Fix regression in dlist save primitive tracking.
My change 7ca4f07b5b caused errors to not
be thrown when they should, because the new if statement for ExecuteFlag
made the CurrentSavePrimitive not get set.  And on further review, we
shouldn't be validating our primitive in GL_COMPILE mode, since the
command shouldn't be executed yet.

Partially fixes piglit gl-1.0-beginend-coverage.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-21 21:26:46 -08:00
Maarten Lankhorst 3a91e7955a vl: round next_msc to integer frame, and kill skew_msc
This reduces jitter slightly in a cleaner way, without desynchronizing mplayer2 as badly
when falling behind.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2013-01-21 23:49:56 +01:00
José Fonseca 71c87e42e1 scons: Fix dependencies of generated headers.
It appears that scons implicit dependency scanners fail to chain
dependencies of generated headers when these are outside the build tree.

This patch ensures generated source files are _always_ put in the build
tree. I'm not 100% this will fix all depency issues, but from my
experiments it does seem to fix this.

NOTE: For this to be effective it is necessary to clean the source tree
from generated header/source files.

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-01-21 19:10:54 +00:00
Ian Romanick 75b7e1df13 intel: Don't expose XRGB8888 visuals any more
There really isn't any point.  There is no resource savings, and we have
to do gymnastics in the driver to make it work.

There are also bad interactions with multisampling and OpenGL ES 3.0.
In ES3, a multisample-to-singlesample blit must have identical source
and destination format.  This means a multisample RGBA8 to singlesample
RGB8 (window) blit will generate an error.  Also in ES3, RGB8 is not a
renderable format.  This means that the application CANNOT make an RGB8
multisample renderbuffer.

As a result, if an application gets an RGB8 window and wants to do
multisample FBO rendering, it will probably break.

"Fixes" gles3conform
framebuffer_blit_functionality_multisampled_to_singlesampled_blit test
on RGB8 visuals.

v2: Fix 'formats' array size.  Suggested by Ken.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
2013-01-21 13:34:34 -05:00
Ian Romanick 9bdf5bef76 i965: Enable floating-point textures always
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Eric Anholt <eric@anholt.net>
2013-01-21 11:46:21 -05:00
Marek Olšák 4a1af434e6 r300g: add a workaround for the AA colorbuffer addressing bug on R500 2013-01-21 17:00:51 +01:00
Marek Olšák 7bfbf5b287 r300g: allow resolutions up to 1280x1024 with AA optimizations on 1-pipe cards
because single-pipe cards have bigger CMASK RAM
2013-01-21 17:00:51 +01:00
Marek Olšák b7cb655298 r300g: enable AA optimizations for the RGBA16F format 2013-01-21 17:00:51 +01:00
Marek Olšák 6f6112a2b9 radeonsi: More assorted depth/stencil changes ported from r600g.
[ Squashed port of the following r600g commits: - Michel Dänzer ]

commit 428e37c2da
Author: Marek Olšák <maraeo@gmail.com>
Date:   Tue Oct 2 22:02:54 2012 +0200

    r600g: add in-place DB decompression and texturing with DB tiling

    The decompression is done in-place and only the compressed tiles are
    decompressed. Note: R6xx-R7xx can do that only with Z16 and Z32F.

    The texture unit is programmed to use non-displayable tiling and depth
    ordering of samples, so that it can fetch the texture in the native DB format.

    The latest version of the libdrm surface allocator is required for stencil
    texturing to work. The old one didn't create the mipmap tree correctly.
    We need a separate mipmap tree for stencil, because the stencil mipmap
    offsets are not really depth offsets/4.

    There are still some known bugs, but this should save some memory and it also
    improves performance a little bit in Lightsmark (especially with low
    resolutions; tested with Radeon HD 5000).

    The DB->CB copy is still used for transfers.

commit e2f623f1d6
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 28 13:55:59 2012 +0200

    r600g: don't decompress depth or stencil if there isn't any

commit 43e226b6ef
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:32:50 2012 +0200

    r600g: optimize uploading depth textures

    Make it only copy the portion of a depth texture being uploaded and
    not the whole 2D layer.

    There is also a little code cleanup.

commit b242adbe5c
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:17:46 2012 +0200

    r600g: remove needless wrapper r600_texture_depth_flush

commit 611dd52942
Author: Marek Olšák <maraeo@gmail.com>
Date:   Wed Jul 18 00:05:14 2012 +0200

    r600g: init_flushed_depth_texture should be able to report errors

commit 80755ff563
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 14 17:06:27 2012 +0200

    r600g: properly track which textures are depth

    This fixes the issue with have_depth_texture never being set to false.

commit fe1fd67556
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 03:10:37 2012 +0200

    r600g: don't flush depth textures set as colorbuffers

    The only case a depth buffer can be set as a color buffer is when flushing.

    That wasn't always the case, but now this code isn't required anymore.

commit 5a17d8318e
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 02:14:18 2012 +0200

    r600g: flush depth textures bound to vertex shaders

    This was missing/broken. There are also minor code cleanups.

commit dee58f94af
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sun Jul 8 01:54:24 2012 +0200

    r600g: do fine-grained depth texture flushing

    - maintain a mask of which mipmap levels are dirty (instead of one big flag)
    - only flush what was requested at a given point and not the whole resource
      (most often only one level and one layer has to be flushed)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-21 15:42:28 +01:00
Vadim Girlin bc398f908f radeonsi: improve flushed depth texture handling
Use r600_resource_texture::flished_depth_texture for GPU access, and
allocate it in the VRAM. For transfers we'll allocate texture in the GTT
and store it in the r600_transfer::staging.

Improves performance when flushed depth texture is frequently used by the
GPU, e.g. in Lightsmark

[ Ported from r600g commit 3770847960 ]

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-21 15:42:28 +01:00
Marek Olšák bfb405ceee radeonsi: Assorted depth/stencil changes ported from r600g.
[ Squashed port of the following r600g commits: - Michel Dänzer ]

commit c1e8c845ea
Author: Marek Olšák <maraeo@gmail.com>
Date:   Sat Jul 7 19:10:00 2012 +0200

    r600g: inline r600_hw_copy_region

commit 4891c5dc64
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jun 25 22:53:21 2012 +0200

    r600g: inline r600_blit_push_depth and use resource_copy_region

    We are going to have a separate resource for depth texturing and transfers
    and this is just a transfer thing.

commit da98bb6fc1
Author: Marek Olšák <maraeo@gmail.com>
Date:   Mon Jun 25 12:45:32 2012 +0200

    r600g: split flushed depth texture creation and flushing

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-21 15:42:28 +01:00
Michel Dänzer f0ffbbc9ff radeonsi: Enable 1D tiling for non-depth resources as well.
No piglit regressions anymore thanks to fixes in libdrm_radeon and here.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-21 14:10:52 +01:00
Michel Dänzer 90d919fcd0 radeonsi: Fix 1D tiling mode index for non-scanout resources.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
2013-01-21 14:10:52 +01:00
Matt Turner a076c272e2 build: Remove dead SHARED_GLAPI variable
The static Makefiles used it.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-20 20:06:46 -08:00
Matt Turner 3f276b37b1 glsl/build: Build glsl_test only on make check
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-20 20:06:44 -08:00
Matt Turner ecbe3118c2 glsl/build: Remove dead LIBRARY_* variables
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-20 20:06:41 -08:00
Matt Turner 37f34e53e0 xmlpool/build: generate options.h via BUILT_SOURCES
Fixes missing options.h when doing 'make check' in dri/common before
'make' has been run.

Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
2013-01-20 20:06:20 -08:00
Jordan Justen 6c7fa72229 fbobject: add additional fbo completeness checks for GLES
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen f8e7aa2827 framebuffer: update allowed implementation format/type
Allow additional format/type combinations based on the
color render buffer to fix failures with gles3-gtf.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen ffdffd834a readpix: allow implementation format/type
For GLES2/3 allow reading of pixels with format/type based on:
 * GL_IMPLEMENTATION_COLOR_READ_FORMAT
 * GL_IMPLEMENTATION_COLOR_READ_TYPE

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen 119002a648 extensions: enable EXT_color_buffer_float for ES3
[mattst88] v2: Enable only for ES3 per spec.
[mattst88] v3: Use _mesa_is_gles3 since EXT_color_buffer_float is
	       ES3-only.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Matt Turner 227f58695e extensions: Add ES3-only extension support
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen ce9118c7f0 readpix: check FBO completeness before trying to access the read-buffer
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen 8b0bc9de36 readpix: add error checking for GLES3
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen a793ffa0b8 copyteximage: update error checking for GLES3
Changes based on GTF/gles3 conformance test suite.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Jordan Justen 3b51d71c85 copyteximage: check that sRGB usage is valid for GLES3 / GL
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-20 19:54:38 -08:00
Ian Romanick 285fe32bd9 intel: Enable GL_OES_depth_texture_cube_map
For now I'm just enabling this on the same subset of hardware that has
OpenGL 3.0 enabled.  This same functionality is part of OpenGL 3.0, and
there is no matching desktop extension.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-20 20:56:23 -05:00
Ian Romanick 1c29d8f4ff mesa/es3: Allow unsized depth and depth-stencil formats in ES3
They're part of GL_OES_depth_texture_cube_map, and we'll always enable
that extension in ES3 contexts.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-20 20:56:20 -05:00
Ian Romanick b3eed73c3b mesa/es2: Allow depth component cube maps in ES2 if the extension is enabled
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-20 20:56:18 -05:00
Ian Romanick 0f899c2da8 mesa: Add extension bit tracking for GL_OES_depth_texture_cube_map
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-20 20:56:01 -05:00
Adam Jackson 30530ee9ac gallium: Remove ppc asm backend
The vs part hasn't been wired up since tgsi_sse2 was disabled in:

    commit 4eb3225b38
    Author: José Fonseca <jose.r.fonseca@gmail.com>
    Date:   Tue Nov 8 00:10:47 2011 +0000

	Remove tgsi_sse2.

And it would certainly not work correctly in its current state:

draw/draw_vs_ppc.c: In function ‘draw_create_vs_ppc’:
draw/draw_vs_ppc.c:190:24: warning: assignment from incompatible pointer
type [enabled by default]

As with the sse2 backend, this should be done in llvm anyway.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-20 17:12:47 -05:00
Andreas Boll 410b58c7bf build: require python module libxml2
configure should warn if libxml2 is not found.
libxml2 is needed by glapi/gen.

Fixes error during build in src/mapi/glapi/gen:
ImportError: No module named libxml2

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31598
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2013-01-19 23:50:39 +01:00
Vincent Lejeune f9f5c92f73 r600g/llvm: Fixes addressspace of basevectors for clipvertex 2013-01-19 22:28:13 +01:00
Christoph Bumiller e264b8ef41 nv50/ir: add definitions of Target and CodeEmitter dtors
I really did build test, my compiler just doesn't seem to care.
2013-01-19 22:13:45 +01:00
Christoph Bumiller 7d2d450ea6 nouveau: fix undefined behaviour when testing sample_count
NOTE: This is a candidate for the 9.0 branch.
2013-01-19 20:54:39 +01:00