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>
Michel Dänzer [Fri, 30 Dec 2011 09:45:31 +0000 (10:45 +0100)]
r600g: Manage fences per screen rather than per context.
A fence is a screen object and can outlive the context it was created from.
The previous code would access freed memory in that case, resulting in
various problems.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=44151
https://bugs.freedesktop.org/show_bug.cgi?id=44007
Probably fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43993
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Stéphane Marchesin [Fri, 30 Dec 2011 09:33:26 +0000 (01:33 -0800)]
i915g: Allocate tmp for KILP
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=44297
Yuanhan Liu [Wed, 28 Dec 2011 05:54:42 +0000 (13:54 +0800)]
vbo: introduce vbo_sizeof_ib_type() function
introduce vbo_sizeof_ib_type() function to return the index data type
size. I see some place use switch(ib->type) to get the index data type,
which is sort of duplicate.
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Stéphane Marchesin [Thu, 29 Dec 2011 01:34:56 +0000 (17:34 -0800)]
llvmpipe: Remove useless draw_install_pstipple_stage call.
It is #ifdef'd out, and is already called unconditionnaly a couple lines above.
Reviewed-By: Jose Fonseca <jfonseca@vmware.com>
Chad Versace [Tue, 27 Dec 2011 18:10:05 +0000 (10:10 -0800)]
intel: Fix memory leak in intel_miptree_create()
On failure, intel_miptree_create() needs to *release* the miptree, not
just free it, so that the stencil_mt gets released too.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Eric Anholt [Mon, 19 Dec 2011 17:20:57 +0000 (09:20 -0800)]
i965/fs: Allow constant propagation into IF with embedded compare.
This saves a couple of instructions on most programs with control
flow. More interestingly, 6 shaders from unigine sanctuary now fit
into 16-wide without register spilling.
Eric Anholt [Sat, 17 Dec 2011 00:22:33 +0000 (16:22 -0800)]
intel: Drop the batchbuffer flush on glRenderbufferStorage().
There's nothing batchbuffer-related here. State updates by the caller
will trigger re-emitting of any new hardware state.
Eric Anholt [Fri, 16 Dec 2011 21:43:26 +0000 (13:43 -0800)]
intel: Drop the batchbuffer flush on glFramebufferRenderbuffer().
There should be nothing special about this call compared to other
callers of intel_draw_buffer().
Eric Anholt [Fri, 16 Dec 2011 21:42:39 +0000 (13:42 -0800)]
intel: Make the batchbuffer flush debug more useful.
We were printing out the line triggering the flush, but a variety of
different causes just printed the line number for intel_flush()'s call
of intel_batchbuffer_flush(). Plumb the line numbers from the caller
of intel_flush() on through.
Eric Anholt [Fri, 16 Dec 2011 21:18:55 +0000 (13:18 -0800)]
intel: Fix performance regression in Lightsmark since HiZ changes.
Since the refactor in
d7b33309fe160212f2eb73f471f3aedcb5d0b5c1, depth
in the miptree changed from 1 to 6, so we always decided it didn't
match, and we would relayout to something that would still not
"match".
Improves performance 23.8% (+/- 1.1%, n=4)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43329
Eric Anholt [Wed, 21 Dec 2011 23:15:09 +0000 (15:15 -0800)]
intel: Don't consider miptrees for other texture targets to match.
We would have done a relayout at validate time, but it's senseless to
store into a miptree if it's going to force relayout.
Vinson Lee [Wed, 28 Dec 2011 08:36:51 +0000 (00:36 -0800)]
mesa: Use __builtin_ffsll on Mac OS X.
Fixes this GCC warning.
arrayobj.c: In function '_mesa_update_array_object_max_element':
arrayobj.c:310: warning: implicit declaration of function 'ffsll'
Signed-off-by: Vinson Lee <vlee@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Stéphane Marchesin [Wed, 28 Dec 2011 20:35:41 +0000 (12:35 -0800)]
i915g: Add missing draw_flush call.
Fixes a bunch of corruption bugs, especially some missing clipped triangles.
José Fonseca [Wed, 28 Dec 2011 11:03:34 +0000 (11:03 +0000)]
mesa: Re-add main/bitset.h to fix classic nouveau build failure.
bitset.h is still used by classic nouveau -- see `git grep '\<BITSET_'`
-- and the state stored is too big to fit in 64bit integers (it requires
approximately 87 bits), so there is no obvious alternative here.
This effecively reverts commit
196800d79829a420073f762fac90090a7b416d2d.
Mathias Fröhlich [Wed, 28 Dec 2011 06:14:51 +0000 (07:14 +0100)]
mesa: Remove now unused main/bitset.h.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich [Tue, 27 Dec 2011 09:45:46 +0000 (10:45 +0100)]
mesa: Remove remaining FEATURE_ARB_vertex_buffer_object guards.
Since commit
82b9661894315362f857192439bdcbc9db090387 and
34eae1c72a9b3a8eb0634cda52fca0208cd2f40d vbo support
is mandatory for all drivers. So, remove the remaining
FEATURE_ARB_vertex_buffer_object guards.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich [Thu, 22 Dec 2011 19:12:20 +0000 (20:12 +0100)]
mesa: Convert to use GLbitfield64 directly.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Mathias Fröhlich [Thu, 22 Dec 2011 19:12:20 +0000 (20:12 +0100)]
radeon: Convert to use GLbitfield64 directly.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Mathias Fröhlich [Thu, 22 Dec 2011 19:12:20 +0000 (20:12 +0100)]
nouveau: Convert to use GLbitfield64 directly.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Mathias Fröhlich [Thu, 22 Dec 2011 19:12:20 +0000 (20:12 +0100)]
i915: Convert to use GLbitfield64 directly.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Mathias Fröhlich [Thu, 22 Dec 2011 19:12:20 +0000 (20:12 +0100)]
mesa: Convert RENDERINPUTS* macros to GLbitfield64.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Stéphane Marchesin [Fri, 23 Dec 2011 02:17:54 +0000 (18:17 -0800)]
i915g: Only apply the optimization to output vars.
This is a bit overkill, but otherwise we need to rename subsequent uses, which is a future TODO.
Reported by CME.
Kenneth Graunke [Sat, 24 Dec 2011 04:24:46 +0000 (20:24 -0800)]
i965/vs: Properly clear cur_value when propagating direct copies.
Consider the following code:
MOV A.x, B.x
MOV B.x, C.x
After the first line, cur_value[A][0] == B, indicating that A.x's
current value came from register B.
When processing the second line, we update cur_value[B][0] to C.
However, for drect copies, we fail to reset cur_value[A][0] to NULL.
This is necessary because the value of A is no longer the value of B.
Fixes Counter-Strike: Source in Wine (where the menu rendered completely
black in DX9 mode), completely white textures in Civilization V, and the
new Piglit test glsl-vs-copy-propagation-1.shader_test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42032
Tested-by: Matt Turner <mattst88@gmail.com>
Tested-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Kenneth Graunke [Sat, 24 Dec 2011 03:57:08 +0000 (19:57 -0800)]
i965/vs: Fix incorrect subscript when resetting copy propagation records.
In this code, 'i' loops over the number of virtual GRFs, while 'j' loops
over the number of vector components (0 <= j <= 3).
It can't possibly be correct to see if bit 'i' is set in the destination
writemask, as it will have values much larger than 3. Clearly this is
supposed to be 'j'.
Found by inspection.
Tested-by: Matt Turner <mattst88@gmail.com>
Tested-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Chad Versace [Thu, 22 Dec 2011 02:34:19 +0000 (18:34 -0800)]
i965: Create mock implementation of GL_OES_EGL_image_external
In Android IceCreamSandwich, SurfaceFlinger requires GL_OES_image_external
for basic compositing tasks. Without the extension, SurfaceFlinger fails
to start.
Despite the incompleteness of the extension's implementation introduced by
this patch, it is good enough to enable SurfaceFlinger and to unblock the
people who need to begin testing Mesa on IceCreamSandwich.
To enable the extension, set the environment variable
MESA_EXTENSION_OVERRIDE="+GL_OES_EGL_image_external". Ideally, Android
should set this in init.rc.
WARNING: This implementation of GL_OES_EGL_image_external is not complete.
Some of it is even incorrect. When we begin to really implement
GL_OES_EGL_image_external, much of the patch will need reverting.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Chad Versace [Thu, 22 Dec 2011 02:34:18 +0000 (18:34 -0800)]
meta: Disable GL_TEXTURE_EXTERNAL_OES in meta_begin()
If the meta flag MESA_META_TEXTURE is present, then disable the texture
target GL_TEXTURE_EXTERNAL_OES.
Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Alexander von Gluck [Tue, 27 Dec 2011 16:18:18 +0000 (09:18 -0700)]
mklib: tab cleanup, no functional change
Reviewed-by: Brian Paul <brianp@vmare.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck [Tue, 27 Dec 2011 16:15:36 +0000 (09:15 -0700)]
mesa: fpclassify is available on Haiku
Reviewed-by: Brian Paul <brianp@vmare.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck [Tue, 27 Dec 2011 16:11:39 +0000 (09:11 -0700)]
glu: remove BeOS define as BeOS is not longer a target platform
Reviewed-by: Brian Paul <brianp@vmare.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Alexander von Gluck [Tue, 27 Dec 2011 16:02:59 +0000 (09:02 -0700)]
gallium: use Mesa pthread_barrier_t on Haiku, as it is incomplete under Haiku
Reviewed-by: Brian Paul <brianp@vmare.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
Dave Airlie [Sat, 24 Dec 2011 19:30:26 +0000 (19:30 +0000)]
gallium/u_pack: fix l8/i8 pack color ub
just noticed this in passing, not sure it actually fixes any issus.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Brian Paul <brianp@vmare.com>
Mathias Fröhlich [Tue, 1 Nov 2011 10:53:46 +0000 (11:53 +0100)]
vbo: Clean up recalculate_input_bindings.
Now the gl_array_object's layout matches the one used in
recalculate_input_bindings. Make use of this and remove the
bind_array_obj function.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Reviewed-by: Brian Paul <brianp@vmare.com>
Alexander von Gluck [Mon, 26 Dec 2011 23:23:03 +0000 (16:23 -0700)]
mklib: Add Haiku build support
Signed-off-by: Brian Paul <brianp@vmware.com>
Johannes Obermayr [Mon, 19 Dec 2011 22:11:46 +0000 (23:11 +0100)]
Fix build with LLVM >= r145623.
This is a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=43861.
Actually the issue which makes -pedantic failing should be solved.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Mon, 26 Dec 2011 21:49:57 +0000 (14:49 -0700)]
swrast: assert _swrast_map_teximage() x, y is multiple of block size
Brian Paul [Mon, 26 Dec 2011 21:49:57 +0000 (14:49 -0700)]
swrast: replace assertion with conditional in _swrast_map_teximage()
Just in case we ran out of memory when trying to allocate the texture
memory.
Brian Paul [Mon, 26 Dec 2011 21:45:42 +0000 (14:45 -0700)]
mesa: fix signed/unsigned comparison warnings
Brian Paul [Mon, 26 Dec 2011 21:43:07 +0000 (14:43 -0700)]
vbo: signal _NEW_ARRAY when transitioning between glBegin/End, glDrawArrays
This fixes a regression seen with the isosurf demo when switching between
glBegin/End and glDrawArrays (do it several times). The problem was the
driver wasn't getting _NEW_ARRAY when the arrays were subtly changed:
(vertex3f, normal3f) vs. (normal3f, vertex3f).
This patch fixes that by signaling _NEW_ARRAY whenever we transition
between glBegin/End and glDrawArrays mode and display lists.
The patch also fixes up the initialization of the map_vp_none[] array
to stop putting strange values in the last five elements of the array.
v2: remove DRAW_ELEMENTS, don't distinguish between glDrawArrays and
glDrawElements
v3: add DRAW_DISPLAY_LIST for the display list case, just to be safe.
Reviewed-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Tested-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich [Mon, 26 Dec 2011 20:45:56 +0000 (21:45 +0100)]
mesa: remove leftovers from color indexed rendering.
Remove gl_light::_dli and gl_light::_sli.
Both are only used for a value previously used in
color indexed rendering. Also both variables are only used
and never written.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Mathias Fröhlich [Mon, 26 Dec 2011 20:45:56 +0000 (21:45 +0100)]
mesa: remove unused _mesa_copy_materials.
Signed-off-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Christian König [Thu, 22 Dec 2011 14:24:46 +0000 (15:24 +0100)]
vl: call decode_bitstream only once
Submit all bitstreams at once to decode_bitstream.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>