Commit Graph

44220 Commits

Author SHA1 Message Date
Brian Paul 2253906da3 tgsi: add info fields for fragcoord origin, center, etc 2011-07-21 09:57:33 -06:00
Brian Paul 9c1319d31d softpipe: remove obsolete comment 2011-07-21 09:55:22 -06:00
Brian Paul f16d97feaa softpipe: rename a function 2011-07-21 09:55:22 -06:00
Brian Paul e37e196151 st/mesa: more helpful debug message in destroy_program_variants_cb() 2011-06-08 15:15:07 -06:00
Brian Paul 2d22186ca8 svga: fix typos, update comments 2011-06-08 15:08:19 -06:00
Jeremy Huddleston 3b23cf43a4 glx: Remove some GLX_USE_APPLEGL guards around glapi
Now that we're using glapi, we don't need some GLX_USE_APPLEGL ifdef-foo

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08 12:03:10 -07:00
Jeremy Huddleston 1b90d7d36b darwin: Use -fvisibility=hidden to set default symbol visibility
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08 11:47:00 -07:00
Jeremy Huddleston 2835c5112d darwin: mklib: Make the real file match the id
This makes mesa more consistent with glibtool and XCode where the
generated file matches the dylib id rather using an extra symlink

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-06-08 11:24:26 -07:00
Chad Versace aea2236af6 intel: Request DRI2 buffers for separate stencil and hiz
When it is sensible to do so,
    1) intelCreateBuffer() now attaches separate depth and stencil
       buffers
       to the framebuffer it creates.
    2) intel_update_renderbuffers() requests for the framebuffer
       a separate stencil buffer (DRI2BufferStencil).

The criteria for "sensible" is:
    - The GLX config has nonzero depth and stencil bits.
    - The hardware supports separate stencil.
    - The X driver supports separate stencil, or its support has not yet
      been determined.

If the hardware supports hiz too, then intel_update_renderbuffers()
also requests DRI2BufferHiz.

If after requesting DRI2BufferStencil we determine that X driver did not
actually support separate stencil, we clean up the mistake and never ask
for DRI2BufferStencil again.

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 f4efb7ff4f intel: Add assertions to intelCreateBuffer()
Assert that the GLX config has an expected depth/stencil bit combination:
one of d24/s8, d16/s0, d0/s0. These are the only depth/stencil
configurations that we advertise.

Remove the check for software stencil, because given the assertions'
constraints the check always fails.

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 89d34cfd3e intel: Refactor intel_update_renderbuffers()
Extract the code that queries DRI2 to obtain the DRIdrawable's buffers
into intel_query_dri2_buffers_no_separate_stencil().

Extract the code that assigns the DRI buffer's DRM region to the
corresponding renderbuffer into
intel_process_dri2_buffer_no_separate_stencil().

Rationale
---------
The next commit enables intel_update_renderbuffers() to query for separate
stencil and hiz buffers. Without separating the separate-stencil and
no-separate-stencil paths, intel_update_renderbuffers() degenerates into
an impenetrable labyrinth of if-trees.

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 84294fe26c intel: Add function intel_renderbuffer_set_hiz_region()
It's the analog of intel_renderbuffer_set_region(), but for the hiz region
of course.

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 beb8b7da20 intel/intel_context.c: Remove unused functions
Remove functions intel_override_hiz() and
intel_override_separate_stencil(). They are now located in intel_screen.c.

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 6b2bf272ee intel: Add flags to intel_screen for hiz and separate stencil
Add the fields below to intel_screen. The expression in parens is the
value to which intelInitScreen2() currently sets the field.
    GLboolean hw_has_separate_stencil      (true iff gen >= 7)
    GLboolean hw_must_use_separate_stencil (true iff gen >= 7)
    GLboolean hw_has_hiz                   (always false)
    enum intel_dri2_has_hiz dri2_has_hiz   (INTEL_DRI2_HAS_HIZ_UNKNOWN)

The analogous fields in intel_context now inherit their values from
intel_screen.

When hiz and separate stencil become completely implemented for a given
chipset, then the respective fields need to be enabled.

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 df9f533c67 intel: Define enum intel_dri2_has_hiz
... which indicates if the X driver supports DRI2BufferHiz and
DRI2BufferStencil.

I'm placing this in its own commit due to the large comment block.

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 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