Commit Graph

48669 Commits

Author SHA1 Message Date
Eric Anholt
15e309cf84 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>
2012-01-04 09:51:17 -08:00
Adam Jackson
3bc4959b14 Remove xmesa_xf86.h
This was a leftover from libGLcore.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-01-04 11:32:38 -05:00
Adam Jackson
2af17433b5 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>
2012-01-04 11:23:55 -05:00
Brian Paul
892a2542a3 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>
2012-01-04 08:12:28 -07:00
Christian König
7b181d16c3 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>
2012-01-04 16:01:09 +01:00
Ian Romanick
4535874c1a 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
2012-01-03 19:21:19 -08:00
Anuj Phogat
0ed11e3331 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>
2012-01-03 19:04:03 -08:00
Matt Turner
2f1ab63fab configure.ac: fix typo from 3ef3ba4d2 2012-01-03 21:58:37 -05:00
Christoph Bumiller
7e291e922e 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
2012-01-03 23:00:31 +01:00
Dave Airlie
69111847a2 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>
2012-01-03 16:19:08 +00:00
Morgan Armand
e763b6e788 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>
2012-01-03 16:19:08 +00:00
Alexander von Gluck
2ae591bdf1 gallium: use Haiku provided debug_printf in OS.h
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-01-03 08:10:49 -07:00
Vadim Girlin
d4bf5cefb0 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>
2012-01-03 09:28:58 -05:00
Ian Romanick
f433fe015e 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>
2012-01-03 10:24:10 +00:00
Ian Romanick
b518dfb513 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>
2012-01-03 10:24:01 +00:00
Brian Paul
14aff23e1b intel: include version.h in intel_screen.c to silence warning
Signed-off-by: Brian Paul <brianp@vmware.com>
2012-01-02 15:20:15 -07:00
Ian Romanick
596d9f6dd1 dri_util: Fix order of error and data parameters to dri2CreateContextAttribs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 13:39:41 -08:00
Dave Airlie
77058335eb r600g: add missing colorswaps for r8 uint/sint.
fixes some warnings in GL3.0 tests.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-01-02 20:45:20 +00:00
Ian Romanick
3ef3ba4d2e 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
8a4b36de05 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
e6280c3ba9 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
e532b6288f 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
296fe21ae5 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
b45f77dc4c 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
4c7898cb13 st/mesa: Reject forward-looking contexts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 12:41:45 -08:00
Ian Romanick
d9de33c304 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
c9d25cf73f 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>
2012-01-02 12:41:45 -08:00
Ian Romanick
78aa71a3ce glx: Connect glXCreateContextAttribsARB to glXGetProcAddress
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 12:41:45 -08:00
Ian Romanick
588042a8ec glx: Initial implementation of glXCreateContextAttribsARB
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 12:41:44 -08:00
Ian Romanick
48ffc6a155 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>
2012-01-02 12:41:44 -08:00
Ian Romanick
6a0640971f glx: Implement glx_screen_vtable::create_context_attribs for indirect contexts
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 12:41:44 -08:00
Ian Romanick
43409fa7b0 glx: Add glx_screen_vtable::create_context_attribs
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2012-01-02 12:41:44 -08:00
Ian Romanick
eacd61bfef 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>
2012-01-02 12:41:44 -08:00
Ian Romanick
6ccda72bf8 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>
2012-01-02 12:41:44 -08:00
Christoph Bumiller
fc7ac4da7d glsl-to-tgsi: handle ir_unop_round_even 2012-01-02 21:16:03 +01:00
Bryan Cain
09497e020a glsl_to_tgsi: fix handling of CONT and BRK in eliminate_dead_code_advanced() 2012-01-02 14:09:45 -06:00
Paul Berry
7cbcce383c 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>
2012-01-02 11:10:57 -08:00
Brian Paul
01a63f4bf5 radeon: move declarations before code 2012-01-02 11:55:40 -07:00
Brian Paul
5edc6fef4c radeon: add casts to silence warnings 2012-01-02 11:55:39 -07:00
Brian Paul
d939838267 radeon: remove unused tex image function prototypes 2012-01-02 11:55:39 -07:00
Brian Paul
d69d287068 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>
2012-01-02 11:55:39 -07:00
Brian Paul
e833b98182 intel: pass xoffset, yoffset = 0 to _mesa_texstore()
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-01-02 11:55:39 -07:00
Eric Anholt
c82c24b18b i965: Silence gcc warning about uninitialized "inst" in assert() case. 2012-01-02 10:38:47 -08:00
Eric Anholt
bf2c7469fb i965: Silence gcc warning from resizing EU store changes. 2012-01-02 10:38:47 -08:00
Christian König
bce506ffc0 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>
2012-01-02 12:47:15 +01:00
Marek Olšák
2cd7e5b737 r300g: inline r300_resource_set_properties 2012-01-01 11:47:06 +01:00
Marek Olšák
ce9d61fec6 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.
2012-01-01 11:47:05 +01:00
Marek Olšák
ce31970af1 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.
2012-01-01 11:47:05 +01:00
Dave Airlie
b5fd0e04a7 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>
2011-12-31 13:48:19 +00:00
Dave Airlie
c44f6e0489 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>
2011-12-31 13:17:23 +00:00