Commit graph

56615 commits

Author SHA1 Message Date
Eric Anholt
74e670d0a3 i965/vs: Do round-robin register allocation on gen6+ like we do in the FS.
This will free instruction scheduling to make better choices.  No
statistically significant performance difference on GLB2.7 (n=93).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-02 15:54:09 -07:00
Rob Bradford
15e64de9e6 wayland: Make eglQueryBufferWL succeed for width and height requests too
Following the addition of the EGL_WIDTH and EGL_HEIGHT this function should
return EGL_TRUE for those requested attributes too.
2013-05-02 16:46:04 -04:00
Zack Rusin
396b861ceb draw/gs: don't crash when vs/gs signatures don't match
instead of crashing just fill zeros at the input slots that don't
match, that's the mandated behavior and it avoids debug asserts.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-02 02:43:42 -04:00
Zack Rusin
999cd79c9e tgsi: allow negation of all integer types
It's valid because we reuse certain arithmetic operations
for both signed and unsigned types (e.g. uadd, umad, which
have a bit unfortunate naming)

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2013-05-02 02:43:42 -04:00
Eric Anholt
1dfea559c3 i965: Fix SNB GPU hangs when a blorp batch is the first thing to execute.
The GPU apparently goes looking for constants even though there are no
shader stages enabled, and gets stuck because we haven't told it there are
no constants to collect.  If any other user of the 3D pipeline had run
(even the Render accel of the X server!) since power on, then the in-GPU
constant buffers would have been set up with some contents we didn't use,
and we would succeed.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56416
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Dave Airlie <airlied@redhat.com>
NOTE: This is a candidate for the stable branches.
2013-05-02 11:27:37 -07:00
Tom Stellard
156bcca62c r600g: Don't set the dest cache bits on surface sync for R600_CONTEXT_FLUSH_AND_INV
We are already emitting a EVENT_TYPE_CACHE_FLUSH_AND_INV_EVENT packet
when this flush flag is set, so flushing the dest caches with a
SURFACE_SYNC should not be necessary.

The motivation for this change is that emitting a SURFACE_SYNC packet with
the CB bits set was causing compute shaders to hang on Cayman.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-02 09:00:37 -07:00
Tom Stellard
5752be0cb7 r600g/compute: Fix build error in debug code
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2013-05-02 09:00:37 -07:00
Armin K
cd84353d57 radeon: Fix build with LLVM 3.3
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-05-02 09:00:37 -07:00
Armin K
4742f9b00b gallivm: Fix build with LLVM 3.3
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2013-05-02 09:00:37 -07:00
Brian Paul
fcfbf4a19f mesa: update comments, simplify code in vtxfmt.c
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:16 -06:00
Brian Paul
5dc0081ade mesa: update GLvertexformat comments
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:16 -06:00
Brian Paul
200e09e393 mesa: remove GLvertexformat::EvalMesh1(), EvalMesh2()
See previous commit comments.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:16 -06:00
Brian Paul
0f365b2d77 mesa: remove GLvertexformat::Rectf()
As with the glDraw* functions, this doesn't have to be in GLvertexformat.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:16 -06:00
Brian Paul
49993a1a9d mesa: simplify dispatch for glDraw* functions
Remove all the glDraw* functions from the GLvertexformat structure.
The point of that dispatch struct is to handle all the functions which
dispatch differently depending on whether we're inside glBegin/End.
glDraw* are never allowed inside glBegin/End so we can remove those
entries.

This simplifies the code paths and gets rid of quite a bit of code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:16 -06:00
Brian Paul
79679e258b vbo: add new vbo_initialize_exec_dispatch(), vbo_initialize_save_dispatch()
First step in simplifying the vertex array / glDraw dispatch code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
d0102500bd mesa: remove _MESA_INIT_EVAL_VTXFMT() macro
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
43b3d3bc25 mesa: remove _MESA_INIT_ARRAYELT_VTXFMT() macro
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
95188fd10f mesa: remove _MESA_INIT_DLIST_VTXFMT() macro
Just expand the code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
84e62b7358 mesa: change _mesa_inside_dlist_begin_end() to handle PRIM_UNKNOWN
If the currently compiled primitive state is PRIM_UNKNOWN we should
not return true from _mesa_inside_dlist_begin_end().  This lets us
simplify the calls to that function.

Note, the call to _mesa_inside_dlist_begin_end() in vbo_save_EndList()
should have probably been checking for PRIM_UNKNOWN too, but it wasn't.
So there's no code change change.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
daf19f28c6 mesa: add names of geometry shader prims in gl_enums.py
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
5472ae1fa9 vbo: fix initial value of ctx->Driver.CurrentSavePrimitive
This is set during context creation/initialization.  We know we're
not inside glBegin/glEnd at this point so use PRIM_OUTSIDE_BEGIN_END.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
ecea61e414 vbo: fix error detection in vbo_save_playback_vertex_list()
The old code didn't make sense.  The clause in question did the
same thing as the next else-if clause.  If we're already executing
a glBegin/End pair and we're starting a new primitive, that's an
error.

Fixes more failures in piglit gl-1.0-beginend-coverage test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
a07437dc28 mesa: comments, formatting fixes in dlist code
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
e880b7cbf8 vbo: remove redundant vfmt->Begin = _save_Begin assignment
The same assignment appears later in the function.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
3e7c16997a mesa: don't install glDraw* functions into the BeginEnd dispatch table
Functions like glDrawArrays, glDrawElements, etc. are illegal between
glBegin/glEnd and should generate GL_INVALID_OPERATION.

Fixes several piglit gl-1.0-beginend-coverage failures.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
d6f3ef92d7 vbo: fix parameter validation for saving dlist glDraw* functions
The _save_OBE_DrawArrays/Elements/RangeElements() functions are
called when building a display list and we know we're outside
glBegin/End.

We shouldn't call the normal _mesa_validate_DrawArrays/Elements()
functions here because those functions only work properly in immediate
mode or during dlist execution.  At dlist compile time, we can't call
_mesa_update_state(), etc. and examine the current state since it won't
apply when the list is executed later.

Fixes several failures in piglit's gl-1.0-beginend-coverage test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
94c7caf406 mesa: add missing error check in _mesa_EndList()
If we're in GL_COMPILE_AND_EXECUTE mode and inside glBegin, calling
glEndList() should generate an error.

Fixes a failure in piglit's gl-1.0-beginend-coverage test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
c1a5c5c13d mesa: remove unused PRIM_INSIDE_UNKNOWN_PRIM constant
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
d5bdce1142 mesa: simplify save_Begin() error checking
The old code was hard to understand and not entirely correct.
Note that PRIM_INSIDE_UNKNOWN_PRIM is no longer set anywhere so
we'll be able to remove that next.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:15 -06:00
Brian Paul
bb459f6295 mesa: refactor _mesa_valid_prim_mode()
...in terms of new _mesa_is_valid_prim_mode().  We need a mode validater
function that doesn't depend on current state for the display list code.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:14 -06:00
Brian Paul
8be093e2f6 mesa: fix CurrentSavePrimitive <= GL_POLYGON tests
Use the new PRIM_MAX value instead so that new geometry shader primitive
types are accounted for.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:14 -06:00
Brian Paul
cce6e30613 mesa: adjust PRIM_x constants for geometry shaders
These values pertain to display lists, and the new types of geometry
shader primitives can be used in display lists.

And add new PRIM_MAX constant for follow-on changes.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:14 -06:00
Brian Paul
aa782f260d mesa: fix save_ShadeModel() logic and add new comments
This removes the test for _mesa_inside_dlist_begin_end().
If ctx->Driver.CurrentSavePrimitive==PRIM_UNKNOWN (the initial value),
_mesa_inside_dlist_begin_end() will, confusingly, return TRUE.
So we didn't set the ctx->ListState.Current.ShadeModel value and it
remained in its indeterminate state.

This didn't effect correctness, but it defeated the intended optimization
of dropping redundant glShadeModel() state changes in order to
coalesce sequences of drawing commands.

Verified with new piglit gl-1.0-dlist-shademodel test.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2013-05-02 09:03:14 -06:00
Adam Jackson
16296cc843 gallivm: Fix altivec intrinsics for 8xi16 add/sub
Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-05-02 10:34:08 -04:00
Lauri Kasanen
35c5b95b94 r600/sb: Fix build failure with non-standard libdrm installation prefix
Just like radeon/uvd, r600/sb fails to find the libdrm includes.

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-05-02 14:57:00 +02:00
Lauri Kasanen
e2b985dc0f radeon/uvd: Fix build failure with non-standard libdrm installation prefix
Without this patch, radeon_uvd failed to find the libdrm includes:

In file included from radeon_uvd.c:48:
../../winsys/radeon/drm/radeon_winsys.h:44:35: error:
libdrm/radeon_surface.h: No such file or directory

Signed-off-by: Lauri Kasanen <cand@gmx.com>
2013-05-02 14:54:03 +02:00
Jordan Justen
02f2bce08d mesa: implement glFramebufferTexture
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-01 16:18:25 -07:00
Jordan Justen
5da8288911 mesa: add Layered field to framebuffers
When checking framebuffer completeness, we test each attachment.
We verify that all attachments are consistent in terms of layers.

1. They must all be layered, or all non-layered
2. If they are layered, they must match in depth

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-01 15:31:48 -07:00
Jordan Justen
a62808085a mesa: add renderbuffer attachment Layered field
If glFramebufferTexture is used, then the framebuffer attachment is
layered.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-01 15:31:44 -07:00
Jordan Justen
a05e201d4a mesa: add renderbuffer Depth field
With glFramebufferTexture, a renderbuffer may support
all layers of the texture, so we need the depth of the
renderbuffer to check for consistency which is required
for framebuffer completeness.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-01 15:30:48 -07:00
Andreas Boll
b8e41db053 mesa: add usage examples to get-pick-list and shortlog scripts
NOTE: This is a candidate for the stable branches.
2013-05-01 21:42:02 +02:00
Andreas Boll
df01201132 docs: add info about bugzilla_mesa.sh script 2013-05-01 21:42:02 +02:00
Andreas Boll
ca79b72c00 mesa: Add a script to generate the list of fixed bugs
This list appears in the fixed bugs section of the release notes.

v2: Add usage examples

NOTE: This is a candidate for the stable branches.
2013-05-01 21:42:02 +02:00
Andreas Boll
f6aab27d43 scons: remove IN_DRI_DRIVER
Not used anymore.
2013-05-01 21:34:48 +02:00
Andreas Boll
be0fec4f5b build: remove unused API_DEFINES
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00
Brian Paul
7f8434b866 configure: remove IN_DRI_DRIVER
Not used anymore.

v2: Andreas Boll <andreas.boll.dev@gmail.com>
    - split patch into two patches
    - remove more unused code

Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00
Brian Paul
4ede5fb0c6 configure: remove FEATURE_GL/ES1/ES2
Not used anymore.

v2: Andreas Boll <andreas.boll.dev@gmail.com>
    - split patch into two patches

Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00
Andreas Boll
6b8f55c4da intel: use automake conditionals for defining FEATURE_{ES1,ES2}
Removes the need of API_DEFINES.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00
Andreas Boll
afa33a001a egl-static: use automake conditionals for defining FEATURE_{GL,ES1,ES2}
Removes the need of API_DEFINES.

Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00
Andreas Boll
3537d853d0 intel: remove executable bit from C file
Reviewed-by: Matt Turner <mattst88@gmail.com>
2013-05-01 21:34:48 +02:00