Marek Olšák [Sun, 1 Jan 2012 18:11:25 +0000 (19:11 +0100)]
u_vbuf: take start_instance into account when uploading instanced attribs
Marek Olšák [Sun, 1 Jan 2012 17:23:07 +0000 (18:23 +0100)]
u_upload_mgr: remove the 'flushed' parameter
Not used by anybody.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sun, 1 Jan 2012 16:53:55 +0000 (17:53 +0100)]
u_vbuf: don't map user buffers, just obtain a pointer to them
Marek Olšák [Sun, 1 Jan 2012 16:38:22 +0000 (17:38 +0100)]
u_vbuf: only map a subrange of buffers to translate
Marek Olšák [Sun, 1 Jan 2012 16:12:35 +0000 (17:12 +0100)]
gallium: fix behavior of pipe_buffer_map_range
To match what transfer_map returns. Really, subtracting the offset leads
to bugs if someone expects it to work exactly like transfer_map.
Reviewed-by: Brian Paul <brianp@vmware.com>
Marek Olšák [Sun, 1 Jan 2012 12:05:16 +0000 (13:05 +0100)]
u_vbuf: remove the workaround for half floats and translate
Marek Olšák [Sun, 1 Jan 2012 11:36:44 +0000 (12:36 +0100)]
translate: implement translation of half floats in the generic codepath
Eric Anholt [Tue, 3 Jan 2012 21:27:18 +0000 (13:27 -0800)]
mesa: Remove the dead Varyings list in the program.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Eric Anholt [Tue, 3 Jan 2012 01:08:13 +0000 (17:08 -0800)]
mesa: Fix glGetTransformFeedbackVarying().
The current implementation was totally broken -- it was looking in an
unpopulated structure for varyings, and trying to do so using the
current list of varying names, not the list used at link time.
v2: Fix leaking of memory into the program per re-link.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Jakob Bornecrantz [Thu, 5 Jan 2012 16:14:13 +0000 (17:14 +0100)]
svga: Trim the dri binary a bit on scons release builds
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Jakob Bornecrantz [Thu, 15 Dec 2011 12:04:56 +0000 (13:04 +0100)]
svga: Fix texture cube param cap
Spotted by Thomas Hellstrom.
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Brian Paul [Thu, 5 Jan 2012 15:30:00 +0000 (08:30 -0700)]
tgsi: consolidate TGSI string arrays in new tgsi_strings.h
There was some duplication between the tgsi_dump.c and tgsi_text.c
files. Also use some static assertions to help catch errors when
adding new TGSI values.
v2: put strings in tgsi_strings.c file instead of the .h file.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Wed, 4 Jan 2012 15:40:04 +0000 (08:40 -0700)]
gallium: add STATIC_ASSERT macro
Brian Paul [Wed, 4 Jan 2012 21:53:55 +0000 (14:53 -0700)]
mesa: only map src/dest regions in _mesa_copy_buffer_subdata()
We were wastefully mapping the whole source/dest buffers before.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Brian Paul [Wed, 4 Jan 2012 21:15:53 +0000 (14:15 -0700)]
mesa: print more info in buffer_object_subdata_range_good() error message
Brian Paul [Wed, 4 Jan 2012 21:15:19 +0000 (14:15 -0700)]
st/mesa: 80-column wrapping
Kenneth Graunke [Thu, 5 Jan 2012 07:49:18 +0000 (23:49 -0800)]
Revert "configure.ac: remove deprecated --with-driver="
This reverts commit
5a478976ae0bb12dd712648d5a9b988dd29c97ef.
It broke the build. DRI drivers were no longer being installed by
`make install` (and probably not being built at all). It appears to be
due to a few small, subtle mistakes, and the fix isn't clear enough to
simply commit without going through review. In the meantime, revert it.
Matt Turner [Sat, 24 Dec 2011 00:21:05 +0000 (19:21 -0500)]
glsl: rename VERSION to VERSION_TOK for automake
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Sat, 24 Dec 2011 00:21:04 +0000 (19:21 -0500)]
configure.ac: bump AC_PREREQ to 2.60
All other xorg modules require at least 2.60 (released in 2006), so we
may as well increase it to match. It's also doubtful anyone tests the
build with 2.59 (from 2003), so it may not even work anyway.
Matt Turner [Sat, 24 Dec 2011 00:21:03 +0000 (19:21 -0500)]
configure.ac: remove deprecated --with-driver=
See
9e7a4147.
Ian Romanick [Thu, 5 Jan 2012 00:51:22 +0000 (16:51 -0800)]
i965: Enable EXT_texture_integer by default
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-with-reservations-by: Eric Anholt <eric@anholt.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
Ian Romanick [Thu, 5 Jan 2012 00:08:20 +0000 (16:08 -0800)]
mesa: Add missing GL_RG_INTEGER cases
Adds two missing '|| srcFormat == GL_RG_INTEGER' in assertions and a
bunch of missing pixel converions cases.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Wed, 4 Jan 2012 23:45:49 +0000 (15:45 -0800)]
i965: Fix infinite loop regression in intel_miptree_all_slices_resolve.
Commit
0ed11e333147e280208d9d0b3ff3f39970547643 fixed a "use after free"
bug by getting the next pointer before deleting the current node.
Unfortunately, it also made "next" never get updated if i->need != need.
Fixes infinite loops in piglit tests fbo-depth-array and fbo-depthtex.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Mon, 2 Jan 2012 23:51:58 +0000 (15:51 -0800)]
i965/vs: Use the proper dimensionality for the sampler result register.
textureSize() returns an int, ivec2, or ivec3, but never an ivec4.
Creating the destination register as an ivec4 triggered later failures,
even though the register did hold the proper values.
For example, piglit test vs-textureSize-compare calls textureSize on a
2D texture and compares the result to an expected value. Unfortunately,
our generated code also tried to compare the third and fourth components
which were undefined, and failed.
Fixes piglit test vs-textureSize-compare as well as 19 subcases of
oglconform's glsl-bif-tex-size test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44339
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Kenneth Graunke [Wed, 4 Jan 2012 11:14:01 +0000 (03:14 -0800)]
i965: Add missing _NEW_TEXTURE dirty bit to brw_vs_prog state atom.
Commit
d45814c925dd6c479cfd383b9b59458fc4359cf7 totally added a data
dependency on _NEW_TEXTURE, even including the comment, but didn't
actually add the dirty bit.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Fri, 30 Dec 2011 18:14:35 +0000 (10:14 -0800)]
mesa: Additional error checks for transform feedback.
From the EXT_transform_feedback spec:
The error INVALID_OPERATION is also generated by BeginTransformFeedbackEXT
if no binding points would be used, either because no program object is
active or because the active program object has specified no varying
variables to record.
...
The error INVALID_VALUE is generated by BindBufferRangeEXT or
BindBufferOffsetEXT if <offset> is not word-aligned.
Fixes Piglit tests:
- EXT_transform_feedback/api-errors no_prog_active
- EXT_transform_feedback/api-errors interleaved_no_varyings
- EXT_transform_feedback/api-errors separate_no_varyings
- EXT_transform_feedback/api-errors bind_offset_offset_1
- EXT_transform_feedback/api-errors bind_offset_offset_2
- EXT_transform_feedback/api-errors bind_offset_offset_3
- EXT_transform_feedback/api-errors bind_offset_offset_5
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Thu, 29 Dec 2011 23:55:01 +0000 (15:55 -0800)]
mesa: Check that all buffers are bound in BeginTransformFeedback.
From the EXT_transform_feedback spec:
The error INVALID_OPERATION is generated by
BeginTransformFeedbackEXT if any transform feedback buffer object
binding point used in transform feedback mode does not have a
buffer object bound.
This required adding a new NumBuffers field to the
gl_transform_feedback_info struct, to keep track of how many transform
feedback buffers are required by the current program.
Fixes Piglit tests:
- EXT_transform_feedback/api-errors interleaved_unbound
- EXT_transform_feedback/api-errors separate_unbound_0_1
- EXT_transform_feedback/api-errors separate_unbound_0_2
- EXT_transform_feedback/api-errors separate_unbound_1_2
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Paul Berry [Fri, 30 Dec 2011 19:02:31 +0000 (11:02 -0800)]
mesa: Fix typos in transform feedback error messages.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Ian Romanick [Sat, 24 Dec 2011 01:16:43 +0000 (17:16 -0800)]
glsl: Don't use base type for bit-not when there's an error
Other parts of the compiler assume that expressions will have
well-formed types or the error type. Just using the type of the thing
being operated on can cause expressions like ~3.14 or ~false to not
have a well-formed type. This could then result in an assertion
failure in the context epxression handler.
If there is an error processing the expression, set the type of the IR
expression to error.
Fixes piglit's bit-not-0[789].frag tests.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42755
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: Vinson Lee <vlee@vmware.com>
Ian Romanick [Tue, 3 Jan 2012 19:35:59 +0000 (11:35 -0800)]
glx: More hacking around versions of XCB that lack GLX_ARB_create_context support
Detect whether a new enough version of XCB is installed at configure
time. If it is not, don't enable the extension and don't build the
unit tests.
v2: Move the AM_CONDIATION outside the case-statement so that it is
invoked even for non-GLX builds. This prevents build failures with
osmesa, for example.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Robert Hooker <robert.hooker@canonical.com>
Brian Paul [Wed, 4 Jan 2012 20:34:54 +0000 (13:34 -0700)]
gallium/util: fix argument cast in x32_s8_get_tile_rgba() call
Brian Paul [Wed, 4 Jan 2012 20:30:35 +0000 (13:30 -0700)]
st/mesa: remove st_CompressedTexSubImage1D/2D/3D()
Just use the core Mesa functions instead.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 4 Jan 2012 20:30:35 +0000 (13:30 -0700)]
st/mesa: fix indentation in st_copy_texsubimage()
Brian Paul [Wed, 4 Jan 2012 20:30:35 +0000 (13:30 -0700)]
st/mesa: remove st_TexImage(), use core Mesa code instead
The core Mesa code does the equivalent memory allocation, image mapping,
storing and unmapping. We just need to call prep_teximage() first to
handle the 'surface_based' stuff.
The other change is to always use the level=0 mipmap image when accessing
individual mipmap level images that are stored in resources/buffers.
Apparently, we were always using malloc'd memory for individual mipmap
images, not resource buffers, before.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Wed, 4 Jan 2012 20:30:35 +0000 (13:30 -0700)]
st/mesa: refactor gl_TexImage() code into prep_teximage()
Preparation for st_TexImage() removal/refactoring.
Signed-off-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Mon, 2 Jan 2012 20:48:34 +0000 (12:48 -0800)]
intel: Re-enable GL_OES_standard_derivatives on GEN4+
This extension only needs to be disabled on GEN3.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 28 Dec 2011 01:16:10 +0000 (17:16 -0800)]
intel: Re-allow blitting glCopyBufferSubData() on gen >= 6.
This was disabled a year ago due to not having a story for handling
the blitter at the time. We're fine with using the blitter now.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 28 Dec 2011 01:22:30 +0000 (17:22 -0800)]
intel: Fix pitch handling for linear blits.
The new assert in intelEmitCopyBlit() gets angry if we don't align to
dwords. Rather than make the assert have a special case for height ==
1 on the assumption that the hardware doesn't use it in that case,
just supply a correct pitch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43214
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Wed, 28 Dec 2011 00:42:44 +0000 (16:42 -0800)]
intel: Fix bad read/write flags on self-copies for glCopyBufferSubData().
We didn't consume these flags in any way that would produce a
functional difference, but we might have some day.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Adam Jackson [Wed, 4 Jan 2012 16:32:38 +0000 (11:32 -0500)]
Remove xmesa_xf86.h
This was a leftover from libGLcore.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Adam Jackson [Tue, 3 Jan 2012 19:39:28 +0000 (14:39 -0500)]
drisw: Fix drawable creation against non-default screens
We don't want to match the visual against the default screen. If the
drawable is on a non-default screen then the appropriate visual might not
exist on the default screen. Conversely, if the same visual is
available on multiple screens then simply selecting for the right VID is
sufficient, since the server has promised that the same visual is
compatible with multiple screens.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
Brian Paul [Wed, 4 Jan 2012 00:48:12 +0000 (17:48 -0700)]
mesa: remove unused _mesa_init_teximage_fields() target parameter
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Christian König [Wed, 4 Jan 2012 14:59:29 +0000 (15:59 +0100)]
vl/mpeg2: simple fix to get xine running again
Otherwise xines xxmc plugin will just display green blocks.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Ian Romanick [Fri, 23 Dec 2011 01:37:26 +0000 (17:37 -0800)]
ff_fragment_shader: Don't generate swizzles for scalar combiner inputs
There are a couple scenarios where the source could be zero and the
operand could be either SRC_ALPHA or ONE_MINUS_SRC_ALPHA. For
example, if the source was ZERO. This would result in something like
(0).w, and a later call to ir_validate would get angry.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42517
Anuj Phogat [Wed, 4 Jan 2012 02:12:06 +0000 (18:12 -0800)]
Fix read from pointer after free
Coverity reported a read from pointer after free defect in
src/mesa/drivers/dri/intel/intel_mipmap_tree.c. Bug# 44205
In intel_miptree_all_slices_resolve() function, i = i->next was
executing after freeing i. I have defined a temporary variable
(next) to store the value of i->next before freeing i
Reported-by: Vinson Lee <vlee@vmware.com>
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Matt Turner [Wed, 4 Jan 2012 02:58:37 +0000 (21:58 -0500)]
configure.ac: fix typo from
3ef3ba4d2
Christoph Bumiller [Tue, 3 Jan 2012 22:00:31 +0000 (23:00 +0100)]
st/mesa: use SINT/UINT formats for VertexAttribIPointer
Reviewed-by: Dave Airlie <airlied@redhat.com>
v2: added assertion that packed formats are not pure integer
Dave Airlie [Tue, 3 Jan 2012 10:38:38 +0000 (10:38 +0000)]
tgsi/softpipe: disable FAST_MATH
In the interest of softpipe preferring correctness over speed and passing more
piglit tests, set this to off by default. For speed you really want llvmpipe.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Morgan Armand [Wed, 7 Dec 2011 20:30:48 +0000 (21:30 +0100)]
softpipe: remove the 32bits limitation on depth(-stencil) formats
This patch remove the 32bits limitation. As a side effect, it bring the support for the GL_ARB_depth_buffer_float extension.
No regression have been found on piglit, and all tests for GL_ARB_depth_buffer_float pass successfully.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alexander von Gluck [Tue, 3 Jan 2012 15:10:42 +0000 (08:10 -0700)]
gallium: use Haiku provided debug_printf in OS.h
Signed-off-by: Brian Paul <brianp@vmware.com>
Vadim Girlin [Thu, 22 Dec 2011 14:35:35 +0000 (18:35 +0400)]
glsl_to_tgsi: v2 Invalidate and revalidate uniform backing storage
If glUniform1i and friends are going to dump data directly in
driver-allocated, the pointers have to be updated when the storage
moves. This should fix the regressions seen with commit
7199096.
I'm not sure if this is the only place that needs this treatment. I'm
a little uncertain about the various functions in st_glsl_to_tgsi that
modify the TGSI IR and try to propagate changes about that up to the
gl_program. That seems sketchy to me.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
v2:
Revalidate when shader_program is not NULL.
Update the pointers for all _LinkedShaders.
Init glsl_to_tgsi_visitor::shader_program to NULL in the
get_pixel_transfer_visitor & get_bitmap_visitor.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Ian Romanick [Tue, 3 Jan 2012 01:44:31 +0000 (17:44 -0800)]
glx: Hack around versions of XCB that lack GLX_ARB_create_context support
A lot of tests in 'make check' will fail under these circumstances,
but at least the build should work.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ian Romanick [Tue, 3 Jan 2012 01:44:30 +0000 (17:44 -0800)]
mesa: XCB is no longer optional for GLX or DRI
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Mon, 2 Jan 2012 22:20:04 +0000 (15:20 -0700)]
intel: include version.h in intel_screen.c to silence warning
Signed-off-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Mon, 2 Jan 2012 21:38:11 +0000 (13:38 -0800)]
dri_util: Fix order of error and data parameters to dri2CreateContextAttribs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Dave Airlie [Mon, 2 Jan 2012 20:44:30 +0000 (20:44 +0000)]
r600g: add missing colorswaps for r8 uint/sint.
fixes some warnings in GL3.0 tests.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Ian Romanick [Fri, 16 Dec 2011 02:45:27 +0000 (18:45 -0800)]
tests/glx: Add unit tests for GLX_ARB_create_context GLX protocol
This adds a new tests directory at the top-level and some extra build
infrastructure. The tests use the Google C++ Testing Framework, and
they will only be built if configure can detect its availability. The
tests are automatically wired-in to run with 'make check'.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Chad Versace <chad.versace@linux.intel.com>
Ian Romanick [Tue, 29 Nov 2011 01:47:59 +0000 (17:47 -0800)]
glx: Don't use 'new' as a function parameter name
Using 'new' as a function parameter name prevents including
glxclient.h the unit tests (future patch) that use the Google C++
Testing Framework.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Fri, 2 Dec 2011 22:45:11 +0000 (14:45 -0800)]
glx: Enable GLX_EXT_create_context_es2_profile
This extension is only enabled if the underlying driver advertises
support for OpenGL ES 2.0. This happens either through the getAPIMask
function in version 2 of the DRI2 extension or implicity through
version 2 of the DRISW extension.
Since there is no OpenGL ES 2.0 protocol, this extension is marked as
only available with direct-rendering.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Thu, 1 Dec 2011 22:06:58 +0000 (14:06 -0800)]
dri2: Add plumbing to get context version requirements and flags to drivers
This adds support for DRI_DRI2 version 3 to all of the DRI2 drivers.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Thu, 1 Dec 2011 22:05:13 +0000 (14:05 -0800)]
glx/dri2: Implement glx_screen_vtable::create_context_attribs for DRISW contexts
This also enables GLX_ARB_create_context and
GLX_ARB_create_context_profile if the driver supports DRI_DRISW
version 3 or greater.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Thu, 1 Dec 2011 21:52:53 +0000 (13:52 -0800)]
glx/dri: Add utility function dri2_convert_glx_attribs
This converts all of the GLX data from glXCreateContextAttribsARB to
the values expected by the DRI driver interfaces.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Thu, 1 Dec 2011 19:31:28 +0000 (11:31 -0800)]
st/mesa: Reject forward-looking contexts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Thu, 1 Dec 2011 02:05:36 +0000 (18:05 -0800)]
dri_util: Mostly stub implementation of dri2CreateContextAttribs
This adds the function and modifies dri2CreateNewContextForAPI to call
it. At this point only version 2 of the DRI2 API is advertised to the
loader.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 19:12:56 +0000 (11:12 -0800)]
glx: Add extension strings for GLX_ARB_create_context and GLX_ARB_create_context_profile
Note that these extensions are not automatically enabled for screens
capable of direct-rendering.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 19:12:49 +0000 (11:12 -0800)]
glx: Connect glXCreateContextAttribsARB to glXGetProcAddress
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 18:33:37 +0000 (10:33 -0800)]
glx: Initial implementation of glXCreateContextAttribsARB
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 21:15:08 +0000 (13:15 -0800)]
glx/dri2: Implement glx_screen_vtable::create_context_attribs for DRI2 contexts
This also enables GLX_ARB_create_context and
GLX_ARB_create_context_profile if the driver supports DRI_DRI2 version
3 or greater.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 21:10:17 +0000 (13:10 -0800)]
glx: Implement glx_screen_vtable::create_context_attribs for indirect contexts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Wed, 30 Nov 2011 21:06:59 +0000 (13:06 -0800)]
glx: Add glx_screen_vtable::create_context_attribs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Tue, 29 Nov 2011 18:57:43 +0000 (10:57 -0800)]
glx: Use __glX_send_client_info with XCB
__glX_send_client_info only supports XCB, so use that instead of
__glXClientInfo when USE_XCB is defined.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Ian Romanick [Tue, 29 Nov 2011 01:50:07 +0000 (17:50 -0800)]
glx: Add __glX_send_client_info super function
This function picks the correct client-info protocol (based on the
server's GLX version and set of extensions) and sends it to the
server.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Christoph Bumiller [Mon, 2 Jan 2012 20:11:45 +0000 (21:11 +0100)]
glsl-to-tgsi: handle ir_unop_round_even
Bryan Cain [Mon, 2 Jan 2012 20:07:38 +0000 (14:07 -0600)]
glsl_to_tgsi: fix handling of CONT and BRK in eliminate_dead_code_advanced()
Paul Berry [Thu, 29 Dec 2011 18:15:43 +0000 (10:15 -0800)]
swrast: Remove dead code in _swrast_clear_depth_buffer()
This code was generating the gcc warning:
variable ‘clearValue’ set but not used [-Wunused-but-set-variable]
Reviewed-by: Brian Paul <brianp@vmare.com>
Brian Paul [Mon, 2 Jan 2012 18:55:40 +0000 (11:55 -0700)]
radeon: move declarations before code
Brian Paul [Mon, 2 Jan 2012 18:55:39 +0000 (11:55 -0700)]
radeon: add casts to silence warnings
Brian Paul [Mon, 2 Jan 2012 18:55:39 +0000 (11:55 -0700)]
radeon: remove unused tex image function prototypes
Brian Paul [Mon, 2 Jan 2012 18:55:39 +0000 (11:55 -0700)]
mesa: remove the dstX/Y/Zoffset params to _mesa_texstore() functions
The were always zero. When doing a sub-texture replacement we account
for the dstX/Y/Zoffsets when we map the texture image. So no need to
pass them into the texstore code anymore.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Brian Paul [Mon, 2 Jan 2012 18:55:39 +0000 (11:55 -0700)]
intel: pass xoffset, yoffset = 0 to _mesa_texstore()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Eric Anholt [Fri, 30 Dec 2011 07:48:24 +0000 (23:48 -0800)]
i965: Silence gcc warning about uninitialized "inst" in assert() case.
Eric Anholt [Fri, 30 Dec 2011 02:12:09 +0000 (18:12 -0800)]
i965: Silence gcc warning from resizing EU store changes.
Christian König [Thu, 22 Dec 2011 14:43:50 +0000 (15:43 +0100)]
vl: seperate shader buffers from components
Buffers for shader based decoding can now be
released without its component still being around.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Acked-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Marek Olšák [Sat, 31 Dec 2011 13:05:47 +0000 (14:05 +0100)]
r300g: inline r300_resource_set_properties
Marek Olšák [Thu, 29 Dec 2011 17:18:38 +0000 (18:18 +0100)]
r300g: rework resource_copy_region, not changing pipe_resource
Changing pipe_resource was wrong, because it can be used by other contexts
at the same time. This fixes the last possible race condition in r300g
that I know of.
This also fixes blitting NPOT compressed textures. Random pixels sometimes
appeared at the right-hand edge of the texture.
Finally, this removes r300_texture_desc::stride_in_pixels. It makes little
sense with sampler views and surfaces being able to override width0, height0,
and the format entirely.
Marek Olšák [Thu, 29 Dec 2011 17:07:22 +0000 (18:07 +0100)]
u_blitter: expose functions for setting default views and surfaces for copying
And more importantly, don't call u_sampler_view_default_template etc.
it was a source of bugs.
Dave Airlie [Sat, 31 Dec 2011 13:48:19 +0000 (13:48 +0000)]
st_glsl_to_tgsi: translate interp mode for front/back color
this fixes a bunch of interpolation tests on softpipe at least.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Sat, 31 Dec 2011 13:17:23 +0000 (13:17 +0000)]
softpipe: reorder LIT to fix fp-lit-src-equals-dst
This reorders the LIT operation like the r600 one to fix the
fp-lit-src-equals-dst piglit test.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Dave Airlie [Fri, 30 Dec 2011 20:10:26 +0000 (20:10 +0000)]
llvmpipe: fix blending for intensity formats
This fixes the piglit fbo-blending-formats test for standard, ARB_texture_float
and EXT_texture_snorm.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Brian Paul [Fri, 30 Dec 2011 23:39:24 +0000 (16:39 -0700)]
st/mesa: remove stImage->base.Face/Level assignments in st_TexImage()
This fixes a regresssion (broken cube maps) caused by the
ctx->Driver.TexImage parameter simplification commit. The target var
is always GL_TEXTURE_CUBE_MAP at this point so the Face field was always
getting set to zero.
These field assignments aren't needed anyway since core Mesa sets them.
Dave Airlie [Fri, 30 Dec 2011 21:17:07 +0000 (21:17 +0000)]
u_format: fix latc fetches.
This fixes the latc fetches for llvmpipe, fixes
fbo-generatemipmap-formats GL_ARB_texture_compression
fbo-generatemipmap-formats GL_ATI_texture_compression_3dc
fbo-generatemipmap-formats GL_EXT_texture_compression_latc
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@gmail.com>
Dave Airlie [Fri, 30 Dec 2011 20:29:08 +0000 (20:29 +0000)]
u_format/rgtc: fix alpha values in returned texels.
This fixes fbo-generatemipmap-formats GL_EXT_texture_compression_rgtc
on llvmpipe.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Alexander von Gluck [Fri, 30 Dec 2011 15:48:43 +0000 (08:48 -0700)]
glsl: fix usage of potentially undefined data_end union
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 30 Dec 2011 15:38:49 +0000 (08:38 -0700)]
st/glx/xlib: check for null attrib_list in glXCreateContextAttribsARB()
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=44234
Brian Paul [Fri, 30 Dec 2011 15:24:56 +0000 (08:24 -0700)]
mesa: simplify Driver.GetCompressedTexImage() parameters
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 30 Dec 2011 15:24:56 +0000 (08:24 -0700)]
mesa: simplify Driver.CompressedTex[Sub]Image function parameters
As with previous commits, the target, level and texObj info can be
obtained through the texImage pointer.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 30 Dec 2011 15:24:55 +0000 (08:24 -0700)]
mesa: simplify Driver.TexImage() parameters
As with TexSubImage(), the target, level and texObj values can be obtained
through the texImage pointer.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 30 Dec 2011 15:24:55 +0000 (08:24 -0700)]
mesa: simplify Driver.TexSubImage() parameters
There's no need to pass the target, level and texObj parameters since
they can be easily obtained from the texImage pointer.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Brian Paul [Fri, 30 Dec 2011 15:24:55 +0000 (08:24 -0700)]
st/mesa: remove TexSubImage code, use core mesa routines instead.
Since the move to Map/UnmapTextureImage, the core mesa routines are
equivalent to what the state tracker was doing.
The TexImage functions can be replaced too, but there's a few differences
that will need to be handled.
Dave Airlie [Fri, 30 Dec 2011 10:52:16 +0000 (10:52 +0000)]
u_format: fix inv_swizzles generation
inv_swizzles is used in lp_tile_soa.py to create lp_tile_soa.c, we overwrite swizzles if they are already set.
This results in the i8 format getting alpha instead of red, and the l8 format
getting blue instead of red.
Fixes fbo-alphatest-formats, fbo-alphatest-formats ARB_texture_float,
and fbo-alphatest-formats EXT_texture_snorm on llvmpipe.
Signed-off-by: Dave Airlie <airlied@redhat.com>