Commit Graph

44205 Commits

Author SHA1 Message Date
Chad Versace 4501a5d6e8 dri2: Add token for DRI2BufferHiz
CC: Ian Romanick <idr@freedesktop.org>
CC: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-08 10:06:40 -07:00
Chad Versace ff99103c0a intel: Define span functions for S8 renderbuffers
Since the stencil buffer is interleaved, the generic Mesa renderbuffer
accessors do not suffice. Custom span functions are necessary.

Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-08 10:06:39 -07:00
Chad Versace 2abc8cae87 i965/brw: Emit state for hiz and separate stencil buffers
When emitting 3DSTATE_DEPTH_BUFFER, also emit 3DSTATE_HIER_DEPTH_BUFFER if
there is a hiz buffer. Ditto for 3DSTATE_STENCIL_BUFFER and a separate
stencil buffer.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Chad Versace <chad@chad-versace.us>
2011-06-08 10:06:39 -07:00
Chia-I Wu 6b492d0976 st/egl: set EGL_ALPHA_MASK_SIZE 2011-06-09 00:23:24 +08:00
Chia-I Wu 4bb748b609 mesa: merge glapidispatch.h into dispatch.h
glapidispatch.h was located in glapi and shared with mesa core.  Because
the way it was shared, mesa core must include it indirectly via
main/dispatch.h.

Now that it is no longer needed by glapi and is located in core mesa,
merging it with main/dispatch.h to avoid wrong uses.
2011-06-08 23:19:01 +08:00
Chia-I Wu 0dc45374f2 mesa: fix function remapping for dlist
glapidispatch.h should not be included directly.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36282
2011-06-08 23:18:57 +08:00
Chia-I Wu fed482f5e3 mesa: fix GLES remap table setup again
Generate different glapidispatch.h's for GL and GLES.  For GLES, we want
a local remap table.

This reverts commit 5af46e8360.  The
commit will break GL remap table setup when main/glapidispatch.h is
regenerated.
2011-06-08 23:17:57 +08:00
Alex Deucher fe3a343441 r600g: fix mixup in GPR resource reg setup
GLOBAL_GPR regs should be 0.  Need to set the
number of temp regs in SQ_GPR_RESOURCE_MGMT_1.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-08 10:50:18 -04:00
Brian Paul 7c2847a972 vbo: run 'indent' on vbo_save_api.c 2011-06-08 08:05:41 -06:00
Brian Paul 9404835ccd mesa: add include/c99/*.h files to tarballs
See https://bugs.freedesktop.org/show_bug.cgi?id=36238

NOTE: This is a candidate for the 7.10 branch.
2011-06-08 08:05:41 -06:00
Brian Paul f1733d16de vbo: rename DO_FALLBACK -> dlist_fallback 2011-06-08 08:05:41 -06:00
Brian Paul 62811057f4 vbo: remove node->count > 0 test in vbo_save_playback_vertex_list()
See piglit dlist-fdo31590.c test and
http://bugs.freedesktop.org/show_bug.cgi?id=31590

In this case we had node->prim_count=1 but node->count==0 because the
display list started with glBegin() but had no vertices.  The call to
glEvalCoord1f() triggered the DO_FALLBACK() path.  When replaying the
display list, the old condition basically no-op'd the call to
vbo_save_playback_vertex_list call().  That led to the invalid operation
error being raised in glEnd().

NOTE: This is a candidate for the 7.10 branch.
2011-06-08 08:05:41 -06:00
Brian Paul f1cdce95f6 vbo: check array indexes to prevent negative indexing
See the piglit dlist-fdo31590.c test

NOTE: This is a candidate for the 7.10 branch.
2011-06-08 08:05:41 -06:00
Brian Paul a25271fcb8 st: use _mesa_is_bufferobj() 2011-06-08 08:05:41 -06:00
Brian Paul d329b68f35 vbo: added a comment 2011-06-08 08:05:41 -06:00
Brian Paul 713fb50759 gallium: fix comments for pipe_stream_output_state 2011-06-08 08:05:40 -06:00
Brian Paul 3d75c42bbf mesa: remove old comment 2011-06-08 08:05:40 -06:00
Brian Paul f9c2feb96b mesa: add more sampler types to is_sampler_type() 2011-06-08 08:05:40 -06:00
Brian Paul 5f2deba9f3 gallium: s/bool/boolean/ 2011-06-08 08:05:40 -06:00
Brian Paul f6572017b9 draw: fix edge flag handling in clipper (for unfilled tris/quads/polygons)
Previously, we were errantly drawing some interior edges of clipped
polygons and quads.  Also, we were introducing extra edges where
polygons intersected the view frustum clip planes.

The main problem was that we were ignoring the edgeflags encoded in
the primitive header's 'flags' field which are set during polygon/quad
->tri decomposition.  We need to observe those during clipping.  Since
we can't modify the existing vert's edgeflag fields, we need to store
them in a parallel array.

Edge flags also need to be handled differently for view frustum planes
vs. user-defined clip planes.  In the former case we don't want to draw
new clip edges but in the later case we do.  This matches NVIDIA's
behaviour and it just looks right.

Finally, note that the LLVM draw code does not properly set vertex
edge flags.  It's OK on the regular software path though.
2011-06-08 08:05:40 -06:00
Jeremy Huddleston 0e8d045bf8 osmesa: Fix missing symbols when GLX_INDIRECT_RENDERING is defined.
When GLX_INDIRECT_RENDERING is defined, some symbols are used in
libglapi.a but are not defined.  Define them through the help of
glapitemp.h.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
2011-06-07 23:06:37 -07:00
Jeremy Huddleston 3a71f880d2 apple: Update dispatch table to current OpenGL specs
This updates the apple dispatch table to match the current glapi.
Aliases are still not handled very well.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07 23:06:37 -07:00
Jeremy Huddleston 3871e74733 apple: Dead code removal
Now that we're using glapi, all of this is no longer needed.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07 23:06:36 -07:00
Jeremy Huddleston e157f381f2 apple: Remove apple_glx_get_proc_address
Now that we're using glapi, we don't need to special case this.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07 23:06:36 -07:00
Jeremy Huddleston 7d215e7c4d apple: Use glapi rather than reinventing the wheel
With this change, Apple's libGL is now using glapi rather than implementing
its own dispatch.  In this implementation, two dispatch tables are created:

__ogl_framework_api always points into OpenGL.framework.
__applegl_api is the vtable that is used.  It points into OpenGL.framework
or to local implementations that override / interpose this in OpenGL.framework

The initialization for __ogl_framework_api was copied from XQuartz with some
modifications and probably still needs further edits to better deal with
aliases.

This is a good step towards supporting both indirect and direct rendering
on darwin.

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07 23:06:35 -07:00
Jeremy Huddleston 88cec59170 apple: Rename __gl_api to __ogl_framework_api
In starting the migration to using mapi, rename __gl_api to
__ogl_framework_api since it is a vtable for OpenGL.framework

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-07 23:06:35 -07:00
Dave Airlie 19b9e523c5 r600g: missed one line in eg dyn gpr fallback.
need more sleep or something.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:53:11 +10:00
Dave Airlie 9fb404b47e r600g: set enable always bits for r600/r700 sq registers.
This makes sure these are enabled even if set to 0 at startup.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:50:58 +10:00
Dave Airlie 190bfea2de r600g: condition evergreen dyn gpr resource management
So only with kernel version 2.7 can this work, thanks to Alex
for pointing that out. Also add a workaround for a hw bug.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:50:58 +10:00
Dave Airlie e84981dede r600g: fix warnings in winsys.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:11:49 +10:00
Dave Airlie c1f9884bbf r600g: enable dynamic GPR resource management on evergreen
Evergreen can do this as well as cayman, so we should enable it.

This fixes a gpu lockup with
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined.shader_test

I need to add a better workaround for r600/r700.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:11:48 +10:00
Dave Airlie f659cc46bc r600g: only add blocks once to the dirty/enabled lists.
This caused a loop in some tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 14:04:26 +10:00
Dave Airlie a5329d4f78 r600g: fix regression in recent state changes.
We weren't emitting the SQ setup regs at all which really is
fail.

When a state is always enabled we need to add it to the dirty list
as well.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 13:22:02 +10:00
Dave Airlie 745abb53cf r600g: move simple part of bo reloc processing inline.
This just moves the messy stuff out of the fast path,
and leaves the fast-case in the fast path.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:01 +10:00
Dave Airlie e66053d01c r600g: take alpha ref update out of line.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie ba78a5a679 r600g: split resource emit path from main register emit path
Since resources don't generally vary in size, this splits
the emit path, it also takes into a/c that texture and vertex resources
have different number of relocs, and avoids emitting the extra
reloc for vertex resources.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie ff8717527d r600g: exit bo per reg scanning loop early.
Exit this loop early to avoid pointless iterations later.

Move the resource bos to the first two regs, it actually
doesn't matter which regs we use for this in resource land.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie 138f660b58 r600g: reorder evergreen draw packets to be smaller.
We were always re-emitting lots of unnecessary changes here,
avoid doing that.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:47:00 +10:00
Dave Airlie 4707ae20ad r600g: inline r600_bo_reference.
This relies on the reference member being first, so document it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:46:59 +10:00
Dave Airlie ff298a66d7 r600g: no need to drop the references here.
We drop them when we reference the new objects in the next line.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:46:59 +10:00
Dave Airlie e21601e46e r600g: use memcmp instead of a loop in state_set_resource
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-08 11:46:50 +10:00
Ian Romanick bb4758669c mesa: Ignore blits to/from missing buffers
The EXT_framebuffer_object spec (and later specs) say:

     "If a buffer is specified in <mask> and does not exist in both
     the read and draw framebuffers, the corresponding bit is silently
     ignored."

Check for color, depth, and stencil that the source and destination
FBOs have the specified buffers.  If the buffer is missing, remove the
bit from the blit request mask and continue.

Fixes the crash in piglit test 'fbo-missing-attachment-blit from', and
fixes 'fbo-missing-attachment-blit es2 from'.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37739
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>

NOTE: This is a candidate for the stable branches.
2011-06-07 18:29:52 -07:00
Ian Romanick 7f9c17aaa8 mesa: Don't try to clear a NULL renderbuffer
In an ES2 context (or if GL_ARB_ES2_compatibility) is supported, the
framebuffer can be complete with some attachments be missing.  In this
case the _ColorDrawBuffers pointer will be NULL.

Fixes the crash in piglit test fbo-missing-attachment-clear.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37739
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>

NOTE: This is a candidate for the stable branches.
2011-06-07 18:29:52 -07:00
Nicolas Kaiser 1d71bbed3b mga: enable GL_ARB_vertex_array_object extension
Tested on a Matrox G550 AGP.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-06-07 16:32:30 -06:00
Benjamin Franzke ac3c2c8ece egl_dri2: Add missing header 2011-06-07 17:59:16 -04:00
Benjamin Franzke 3b11d67ef6 egl_dri2: Add missing license 2011-06-07 17:58:59 -04:00
Benjamin Franzke ec2b08de77 egl_dri2: Use libudev only if available
Broken since 7f881c43df.
2011-06-07 17:58:47 -04:00
Pierre-Eric Pelloux-Prayer bdf2e11285 r600g : fix incorrect size computation in r600_query_result
query->num_results already has the size in dwords of the query
buffer.  There no need to multiply again.  We were reading past
the end of the buffer, resulting in reading garbage.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=37028

agd5f: clarify the comment.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07 17:40:37 -04:00
Alex Deucher 5d4c479822 r600g: remove pre-r6xx asic families and pci ids
Not sure why these were included originally.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07 17:04:52 -04:00
Alex Deucher 7c1d478192 r600g: always clear query memory
According to the hw documentation, the driver needs to:
- allocate 128 bits for each possible DB
- clear the 128 bits for each possible DB
- write 1 to bits 127 and 63 for upper DBs that don't
exist on a particular asic

Previously we were only doing these steps if the
asic had less than the max possible DBs.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-07 16:44:40 -04:00