Chia-I Wu [Wed, 8 Jun 2011 08:33:56 +0000 (16:33 +0800)]
egl_dri2: try swrastg_dri if swrast_dri fails
Per libGL.
Chia-I Wu [Wed, 8 Jun 2011 08:33:55 +0000 (16:33 +0800)]
egl_dri2: add dri2_load_driver_swrast
Refactor dri2_load_driver and add dri2_load_driver_swrast for loading
swrast DRI driver.
Benjamin Franzke [Sat, 11 Jun 2011 21:00:40 +0000 (23:00 +0200)]
egl_dri2: Compare configs before matching them
This compares attribs like buffer size, and will prevent merging
unequal configs because of match criterion is e.g. ATLEAST.
Benjamin Franzke [Sat, 11 Jun 2011 20:24:14 +0000 (22:24 +0200)]
st/eglwayland: Add support for EGL_DEFAULT_DISPLAY
Benjamin Franzke [Sat, 11 Jun 2011 20:07:02 +0000 (22:07 +0200)]
egl_dri2/wayland: Add support for EGL_DEFAULT_DISPLAY
Jeremy Huddleston [Sun, 12 Jun 2011 06:43:38 +0000 (23:43 -0700)]
apple: Request OpenGL 3.2 from OpenGL.framework if available
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 12 Jun 2011 06:43:03 +0000 (23:43 -0700)]
apple: Store the CGL API version number for future reference
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Sun, 12 Jun 2011 05:54:59 +0000 (22:54 -0700)]
apple: Use a struct glx_config * rather than a void * in apple_visual_create_pfobj
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Fri, 10 Jun 2011 00:29:51 +0000 (17:29 -0700)]
apple: Use _glapi_create_table_from_handle to initialize our dispatch table
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Thu, 9 Jun 2011 23:59:49 +0000 (16:59 -0700)]
glapi: Add API that can create a _glapi_table from a dlfcn handle
Example usage:
void *handle = dlopen(opengl_library_path, RTLD_LOCAL);
struct _glapi_table *disp = _glapi_create_table_from_handle(handle, "gl");
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Marek Olšák [Sat, 11 Jun 2011 21:01:36 +0000 (23:01 +0200)]
r300g: max_anisotropy of 1 is not anisotropic filtering
Daniel Vetter [Tue, 7 Jun 2011 20:22:16 +0000 (22:22 +0200)]
i915g: implement fence signalling
v2: Incorporated feedback from Jakob Bornecrantz.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Anholt [Wed, 8 Jun 2011 20:44:00 +0000 (13:44 -0700)]
i965: Add support for GL_FIXED vertex attributes.
This sadly requires work in the VS to rescale them, because the
hardware doesn't support this format natively.
Fixes arb_es2_compatibility-fixed-type and gtf/fixed_data_type.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Eric Anholt [Wed, 8 Jun 2011 18:25:04 +0000 (11:25 -0700)]
glsl: Fix incorrect optimization of instructions before discard statements.
The function was named "find_unconditional_discard", but didn't
actually check that the discard statement found was unconditional.
Fixes piglit glsl-fs-discard-04.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eugeni Dodonov [Fri, 10 Jun 2011 18:26:02 +0000 (15:26 -0300)]
Fix format not a string literal error with -Werror=format-security
A trivial fix for error: format not a string literal and no format
arguments with compiling with -Werror=format-security flags.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Fri, 10 Jun 2011 17:27:54 +0000 (10:27 -0700)]
i965/brw: Fix emit_depthbuffer() when packed depth/stencil texture is attached
If either depth or stencil buffer has packed depth/stencil format, then do
not use separate stencil.
Before this commit, emit_depthbuffer() incorrectly assumed that the
texture's stencil renderbuffer wrapper was a *separate* stencil buffer,
because the depth and stencil renderbuffer wrappers are distinct for
depth/stencil textures (that is, depth_irb != stencil_irb).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38134
Signed-off-by: Chad Versace <chad@chad-versace.us>
Alex Deucher [Thu, 9 Jun 2011 20:54:23 +0000 (16:54 -0400)]
r600g: VGT_PRIMITIVE_TYPE is special
It's a special reg and does not require a flush like
the other CONFIG regs.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Alex Deucher [Thu, 9 Jun 2011 20:26:50 +0000 (16:26 -0400)]
r600g: Handle CONFIG regs properly
CONFIG regs (byte offsets 0x8000-0xac00) are single state and the pipeline
must be flushed and hw idle when they are changed. Border color regs
are in the CONFIG range and this is why a flush is required when changing
them. CONTEXT regs (byte offset 0x28000+) are multi-state and those do
not require flushes when changing them.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Eric Anholt [Sun, 5 Jun 2011 18:52:20 +0000 (11:52 -0700)]
i965/gen6: Add support for gl_PointCoord.
This is just like PointSprite overrides, but it's always on for that
attribute.
Fixes glsl-fs-pointcoord, gtf/point_sprites.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sun, 5 Jun 2011 18:50:00 +0000 (11:50 -0700)]
i965/gen6: Fix point sprite texture coordinate overrides.
We were assuming that the input attribute n to the FS was
FRAG_ATTRIB_TEXn, which happened to be true often enough for our
testcases.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Sun, 5 Jun 2011 18:45:04 +0000 (11:45 -0700)]
i965/gen6: Refactor SF setup a bit to handle overrides in one place.
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Marek Olšák [Thu, 9 Jun 2011 02:09:40 +0000 (04:09 +0200)]
r300g: fix texturing with non-3D textures and wrap R mode set to sample border
If the wrap R (3rd) mode is set to CLAMP or CLAMP_TO_BORDER and the texture
isn't 3D, r300 always samples the border color regardless of texture
coordinates.
I HATE THIS HARDWARE.
NOTE: This is a candidate for the 7.10 branch.
Marek Olšák [Thu, 9 Jun 2011 01:36:37 +0000 (03:36 +0200)]
r300g: don't enable aniso with nearest filtering
Dave Airlie [Wed, 8 Jun 2011 04:35:00 +0000 (14:35 +1000)]
r600g: adjust vs/ps gprs on r600/r700 cards when needed.
Ideally we'd have a compiler and register spilling and all that
but this is good enough for now to avoid the gpu hang in piglit,
glsl-vs-vec4-indexing-temp-dst-in-nested-loop-combined
on r600/r700 cards.
based on r600c patch
Andre Maasikas <amaasikas@gmail.com>
r600c: bump sq gpr resources if a shader needs more than default
Signed-off-by: Dave Airlie <airlied@redhat.com>
Marek Olšák [Wed, 8 Jun 2011 23:34:24 +0000 (01:34 +0200)]
r600g: remove unused variable
Marek Olšák [Wed, 8 Jun 2011 22:50:29 +0000 (00:50 +0200)]
r300g: fix draw_vbo splitting on r3xx-r4xx
NOTE: This is a candidate for the 7.10 branch.
Marek Olšák [Wed, 8 Jun 2011 22:33:45 +0000 (00:33 +0200)]
r300g: make translate_primitive table-driven
Roland Scheidegger [Wed, 8 Jun 2011 23:11:52 +0000 (01:11 +0200)]
util: fix strict aliasing issues in u_format_r11g11b10f.h
Roland Scheidegger [Wed, 8 Jun 2011 22:47:19 +0000 (00:47 +0200)]
mesa: get rid of homegrown logbase2 implementation in drivers
Some of the logbase2 functions did just the same as _mesa_logbase2,
though they were taking signed numbers (but it shouldn't matter for them).
Roland Scheidegger [Wed, 8 Jun 2011 22:45:03 +0000 (00:45 +0200)]
mesa: fix gcc version check for _mesa_bitcount
The version check was bogus, and only inside a non-gcc block anyway.
Roland Scheidegger [Wed, 8 Jun 2011 22:44:32 +0000 (00:44 +0200)]
mesa: use __builtin_clz for logbase2 when available
Also rename to _mesa_logbase2 and move to imports.h to keep the ugly
ifdef GNUC stuff outside other files (also to allow reuse).
Roland Scheidegger [Wed, 8 Jun 2011 21:23:24 +0000 (23:23 +0200)]
util: add gcc version check for builtins
Looks like only next_power_of_two, logbase2 and bitcount use builtins
requiring gcc 3.4, so maybe everything else compiles with older gcc.
Benjamin Bellec [Wed, 8 Jun 2011 21:00:54 +0000 (23:00 +0200)]
util: better logbase2/next_power_of_two implementations
Use __builtin_clz when available for logbase/next_power_of_two,
and replace next_power_of_two with faster implementation otherwise.
José Fonseca [Wed, 8 Jun 2011 13:20:49 +0000 (14:20 +0100)]
glx/xlib: Handle glXCreateContextAttribsARB in glXGetProcAddress.
Kenneth Graunke [Tue, 7 Jun 2011 00:19:12 +0000 (17:19 -0700)]
i965/gen7: Call gen7_create_constant_surface instead of brw_[...].
Fixes 17 piglit tests:
- glsl-vs-arrays-3
- glsl-vs-texturematrix-2
- glsl-vs-uniform-array-2
- arl
- nv-arl
- nv-init-zero-addr
- vp-address-01
- vp-arl-constant-array
- vp-arl-constant-array-huge
- vp-arl-constant-array-huge-offset
- vp-arl-constant-array-huge-offset-neg
- vp-arl-constant-array-huge-relative-offset
- vp-arl-constant-array-huge-varying
- vp-arl-env-array
- vp-arl-local-array
- vp-arl-neg-array
- vp-arl-neg-array-2
Fixes 4 glean tests:
- glsl1-constant array of vec4 with variable indexing, vertex shader
- glsl1-constant array with variable indexing, vertex shader
- glsl1-constant array with variable indexing, vertex shader (2)
- vp1-ARL test
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 6 Jun 2011 18:14:15 +0000 (11:14 -0700)]
i965/gen7: Enable SIMD16 fragment shader dispatch.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 6 Jun 2011 17:35:58 +0000 (10:35 -0700)]
i965/gen7: Don't emit 3DSTATE_GS_SVB_INDEX on Ivybridge.
According to vol2a.07, it only applies from Cantiga to Sandybridge.
I found this in my ringbuffers while investigating various GPU hangs.
While it may not have been the cause, it seemed wise to remove it.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 23 May 2011 21:01:16 +0000 (14:01 -0700)]
i965/gen7: Program stencil buffers on Ivybridge.
Thanks to Chad's hard work implementing separate stencil and HiZ
support, this is entirely straightforward.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 23 May 2011 21:40:51 +0000 (14:40 -0700)]
i965/gen7: Add a prepare_depthbuffer function.
We need to call add_validated_bo to do proper aperture space accounting.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 23 May 2011 18:55:39 +0000 (11:55 -0700)]
i965/gen7: gen7_emit_depthbuffer needs the _NEW_DEPTH dirty bit.
For ctx->Depth.Mask.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Mon, 23 May 2011 18:24:43 +0000 (11:24 -0700)]
i965/gen7: Remove stencil renderbuffer from gen7_depth_format.
Since Gen7 doesn't support packed depth/stencil, the stencil buffer
can't possibly be relevant for determining the depth format.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Wed, 8 Jun 2011 21:15:07 +0000 (15:15 -0600)]
st/mesa: more helpful debug message in destroy_program_variants_cb()
Brian Paul [Wed, 8 Jun 2011 21:07:15 +0000 (15:07 -0600)]
svga: fix typos, update comments
Jeremy Huddleston [Wed, 8 Jun 2011 19:03:10 +0000 (12:03 -0700)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 18:47:00 +0000 (11:47 -0700)]
darwin: Use -fvisibility=hidden to set default symbol visibility
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Wed, 8 Jun 2011 18:20:38 +0000 (11:20 -0700)]
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>
Chad Versace [Fri, 3 Jun 2011 23:33:32 +0000 (16:33 -0700)]
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>
Chad Versace [Thu, 26 May 2011 21:55:54 +0000 (14:55 -0700)]
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>
Chad Versace [Fri, 3 Jun 2011 23:14:25 +0000 (16:14 -0700)]
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>
Chad Versace [Tue, 31 May 2011 21:18:22 +0000 (14:18 -0700)]
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>
Chad Versace [Wed, 1 Jun 2011 22:14:18 +0000 (15:14 -0700)]
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>
Chad Versace [Thu, 26 May 2011 22:24:48 +0000 (15:24 -0700)]
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>
Chad Versace [Wed, 1 Jun 2011 21:19:29 +0000 (14:19 -0700)]
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>
Chad Versace [Thu, 26 May 2011 23:50:30 +0000 (16:50 -0700)]
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>
Chad Versace [Wed, 1 Jun 2011 18:31:56 +0000 (11:31 -0700)]
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>
Chad Versace [Mon, 23 May 2011 20:48:28 +0000 (13:48 -0700)]
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>
Chia-I Wu [Wed, 8 Jun 2011 16:23:16 +0000 (00:23 +0800)]
st/egl: set EGL_ALPHA_MASK_SIZE
Chia-I Wu [Wed, 8 Jun 2011 14:24:32 +0000 (22:24 +0800)]
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.
Chia-I Wu [Wed, 8 Jun 2011 13:51:41 +0000 (21:51 +0800)]
mesa: fix function remapping for dlist
glapidispatch.h should not be included directly.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36282
Chia-I Wu [Wed, 8 Jun 2011 14:04:16 +0000 (22:04 +0800)]
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
5af46e836073d2112b147b524e441bdb808cc128. The
commit will break GL remap table setup when main/glapidispatch.h is
regenerated.
Alex Deucher [Wed, 8 Jun 2011 14:50:18 +0000 (10:50 -0400)]
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>
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
vbo: run 'indent' on vbo_save_api.c
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
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.
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
vbo: rename DO_FALLBACK -> dlist_fallback
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
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.
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
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.
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
st: use _mesa_is_bufferobj()
Brian Paul [Wed, 8 Jun 2011 14:05:41 +0000 (08:05 -0600)]
vbo: added a comment
Brian Paul [Wed, 8 Jun 2011 14:05:40 +0000 (08:05 -0600)]
gallium: fix comments for pipe_stream_output_state
Brian Paul [Wed, 8 Jun 2011 14:05:40 +0000 (08:05 -0600)]
mesa: remove old comment
Brian Paul [Wed, 8 Jun 2011 14:05:40 +0000 (08:05 -0600)]
mesa: add more sampler types to is_sampler_type()
Brian Paul [Wed, 8 Jun 2011 14:05:40 +0000 (08:05 -0600)]
gallium: s/bool/boolean/
Brian Paul [Wed, 8 Jun 2011 14:05:40 +0000 (08:05 -0600)]
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.
Jeremy Huddleston [Tue, 7 Jun 2011 04:51:18 +0000 (00:51 -0400)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 04:21:47 +0000 (21:21 -0700)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 02:35:09 +0000 (19:35 -0700)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 02:26:53 +0000 (19:26 -0700)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 01:51:17 +0000 (18:51 -0700)]
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>
Jeremy Huddleston [Wed, 8 Jun 2011 01:00:23 +0000 (21:00 -0400)]
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>
Dave Airlie [Wed, 8 Jun 2011 04:52:30 +0000 (14:52 +1000)]
r600g: missed one line in eg dyn gpr fallback.
need more sleep or something.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 8 Jun 2011 04:25:02 +0000 (14:25 +1000)]
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>
Dave Airlie [Wed, 8 Jun 2011 04:45:31 +0000 (14:45 +1000)]
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>
Dave Airlie [Wed, 8 Jun 2011 04:10:49 +0000 (14:10 +1000)]
r600g: fix warnings in winsys.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Wed, 8 Jun 2011 04:09:59 +0000 (14:09 +1000)]
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>
Dave Airlie [Wed, 8 Jun 2011 04:02:00 +0000 (14:02 +1000)]
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>
Dave Airlie [Wed, 8 Jun 2011 03:20:17 +0000 (13:20 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 05:40:20 +0000 (15:40 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 05:39:29 +0000 (15:39 +1000)]
r600g: take alpha ref update out of line.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 7 Jun 2011 03:21:02 +0000 (13:21 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 02:33:24 +0000 (12:33 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 01:30:47 +0000 (11:30 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 01:03:59 +0000 (11:03 +1000)]
r600g: inline r600_bo_reference.
This relies on the reference member being first, so document it.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Tue, 7 Jun 2011 00:49:50 +0000 (10:49 +1000)]
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>
Dave Airlie [Tue, 7 Jun 2011 00:38:46 +0000 (10:38 +1000)]
r600g: use memcmp instead of a loop in state_set_resource
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ian Romanick [Tue, 7 Jun 2011 19:38:39 +0000 (12:38 -0700)]
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.
Ian Romanick [Tue, 7 Jun 2011 19:27:04 +0000 (12:27 -0700)]
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.
Nicolas Kaiser [Tue, 7 Jun 2011 21:56:03 +0000 (23:56 +0200)]
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>
Benjamin Franzke [Tue, 7 Jun 2011 20:19:21 +0000 (22:19 +0200)]
egl_dri2: Add missing header
Benjamin Franzke [Tue, 7 Jun 2011 20:15:32 +0000 (22:15 +0200)]
egl_dri2: Add missing license
Benjamin Franzke [Tue, 7 Jun 2011 19:59:02 +0000 (21:59 +0200)]
egl_dri2: Use libudev only if available
Broken since
7f881c43dfb4f1aeeab3a84125b5c106c191a43f.