Commit Graph

56597 Commits

Author SHA1 Message Date
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
Brian Paul aaab450d22 docs: s/Aprile/April/ 2013-05-01 13:17:21 -06:00
Andreas Boll 85e5bc106c docs: fix 9.1.2 release notes 2013-05-01 21:01:48 +02:00
Marek Olšák 8eef6ad2e2 vbo: fix possible use-after-free segfault after a VAO is deleted
This like the fifth attempt to fix the issue.

Also with the new "validating" flag, we can set recalculate_inputs to FALSE
earlier in vbo_bind_arrays, because _mesa_update_state won't change it.

NOTE: This is a candidate for the stable branches.

v2: fixed a typo

Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-01 20:08:53 +02:00
Kenneth Graunke b5b6460c40 i965/vs: Fix textureGrad() with shadow samplers on Haswell.
The shadow comparitor needs to be loaded into the Z component of the
last DWord.

Fixes es3conform's shadow_execution_vert and oglconform's
shadow-grad advanced.textureGrad.1D tests on Haswell.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-05-01 10:42:51 -07:00
Kenneth Graunke e2f887b243 i965: Lower textureGrad() for samplerCubeShadow.
According to the Ivybridge PRM, Volume 4 Part 1, page 130, in the
section for the sample_d message: "The r coordinate contains the faceid,
and the r gradients are ignored by hardware."

This doesn't match GLSL, which provides gradients for all of the
coordinates.  So we would need to do some math to compute the face ID
before using sample_d.  We currently don't have any code to do that.

However, we do have a lowering pass that converts textureGrad to
textureLod, which solves this problem.  Since textureGrad on three
components is sufficiently obscure, it's not a performance path.

For now, only handle samplerCubeShadow; we need tests for samplerCube
and samplerCubeArray.

Fixes es3conform's shadow_comparison_frag test on Haswell.

NOTE: This is a candidate for stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
2013-05-01 10:42:51 -07:00
Christian König 163b4da874 radeon/uvd: fix quant scan order for mpeg2
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-05-01 13:33:46 +02:00
Christian König 3aafe2437d st/vdpau: fix background handling in the mixer
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-05-01 13:33:46 +02:00
Christian König 7d2f2a0c89 vl/buffer: use 2D_ARRAY instead of 3D textures
Signed-off-by: Christian König <christian.koenig@amd.com>
2013-05-01 13:33:46 +02:00
Christian König e27f87b549 vl/compositor: cleanup background clearing
Add an extra parameter to specify if we should clear the render target.

Signed-off-by: Christian König <christian.koenig@amd.com>
2013-05-01 13:33:46 +02:00
Brian Paul 236ea7900f swrast: add casts for ImageSlices pointer arithmetic
MSVC doesn't like pointer arithmetic with void * so use GLubyte *.

Reviewed-by: Jose Fonseca<jfonseca@vmware.com>
2013-05-01 11:53:02 +01:00
Chia-I Wu 22c5e048bd ilo: fix PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS
On GEN7+, is->dev.has_gen7_sol_reset is required.
2013-05-01 17:41:39 +08:00
Chia-I Wu 16f81fcf1e ilo: enable SO support on GEN7 2013-05-01 17:36:44 +08:00
Chia-I Wu d26f70e208 ilo: reset SO write offsets for new SO targets
When the SO targets are changed and no appending is requested, we need to send
SOL_RESET on GEN7+.
2013-05-01 17:36:44 +08:00
Chia-I Wu 68e1f76e46 ilo: correctly program SO states for GEN7
With the commands supported by GPE, we can finally program the states.
2013-05-01 17:36:44 +08:00
Chia-I Wu 9557cd39e2 ilo: implement GEN7 SO GPE functions
They were just stubs before.
2013-05-01 17:36:09 +08:00
Chia-I Wu 9069a3b065 ilo: add gen6_pipeline_update_max_svbi()
Move max_svbi calculation to a helper function and make it available for other
GENs.
2013-05-01 17:35:43 +08:00
Chia-I Wu 252a21c2cc ilo: expose register indices of OUTs in ilo_shader
pipe_stream_output_info tells us which of OUT[i] needs to be written out.
We need the info to map OUT[i] to VUE offset.
2013-05-01 17:34:49 +08:00
Chia-I Wu 440557db4e ilo: allow one-off flags to be specified for CP
It will be used for SOL_RESET on GEN7.
2013-05-01 16:03:44 +08:00