OSDN Git Service
Eric Anholt [Tue, 12 Jul 2011 20:47:21 +0000 (13:47 -0700)]
i915: Fix incorrect depth scaling when enabling/disabling depth buffers.
We were updating our new viewport using the old buffers' _WindowMap.m.
We can do less math and avoid using that deprecated matrix by just
folding the viewport calculation right in to the driver.
Fixes piglit fbo-depthtex.
(cherry picked from commit
debf751aeaf0f02b9a7fc0e242ae3b97dde8416f)
Eric Anholt [Tue, 12 Jul 2011 17:57:51 +0000 (10:57 -0700)]
i915: Make stencil test for no-stencil handling match depth test.
i915_update_draw_buffers() already handles the fallback bit for
missing stencil region, so here we just need to handle whether the GL
thinks we have stencil data or not (and disable the test if so).
(cherry picked from commit
79fee3a76b7f4f63d01266fc3a3cd6ca44d1e513)
Eric Anholt [Tue, 12 Jul 2011 17:48:40 +0000 (10:48 -0700)]
i915: Disable the depth test whenever we don't have a depth buffer.
We were disabling it once at the moment we changed draw buffers, but
later enabling of depth test could turn it back on. Fixes
fbo-nodepth-test.
Note that ctx->DrawBuffer has to be checked because during context
create we get called while it's still unset. However, we know we'll
get an intel_draw_buffer() after that, so it's safe to make a silly
choice at this point.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30080
(cherry picked from commit
fc4fba52cf7e9616c70dd76b4d6bdba6582e157b)
Eric Anholt [Tue, 12 Jul 2011 17:03:41 +0000 (10:03 -0700)]
i915: Remove i965 paths from i915_update_drawbuffer() and i830's too.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
4c47fce92e381cb182b51ce6d0727c0a1365e8b0)
Eric Anholt [Tue, 12 Jul 2011 16:52:04 +0000 (09:52 -0700)]
i965: Remove i915 paths from brw_update_draw_buffers().
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
94efc350b4146b2fb82d45eeb78bd6be6f06fb9c)
Eric Anholt [Tue, 12 Jul 2011 16:49:23 +0000 (09:49 -0700)]
i965: Remove unused region calculations in brw_update_draw_buffer().
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
c68270a26b110e97ee93d49249025d56c771cc5f)
Eric Anholt [Tue, 12 Jul 2011 16:48:08 +0000 (09:48 -0700)]
i965: Remove empty brw_set_draw_region.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
15af0f54b87ea337d419b50010037a3db8e2503c)
Eric Anholt [Tue, 12 Jul 2011 16:47:38 +0000 (09:47 -0700)]
i965: Remove FALLBACK() from brw_update_draw_region().
The 965 driver doesn't use these for deciding on fallbacks.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
dd898c3e89597f841a55272be1ccc07345500f60)
Eric Anholt [Tue, 12 Jul 2011 16:43:22 +0000 (09:43 -0700)]
intel: Move intel_draw_buffers() code into each driver.
The illusion of shared code here wasn't fooling anybody. It was
tempting to keep i830 and i915 still shared, but I think I actually
want to make them diverge shortly.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
f34ec6169dc8b96e3958a42b51c9048c5f42ed80)
Brian Paul [Wed, 20 Jul 2011 03:10:25 +0000 (21:10 -0600)]
glsl: silence warning in linker.cpp
(cherry picked from commit
4470ff2ebf56b22421038bc7272ef22c085b839d)
Jørgen Lind [Tue, 19 Jul 2011 20:52:20 +0000 (22:52 +0200)]
Make it possible to use gbm with c++
NOTE: This is a candiate for 7.11
(cherry picked from commit
496bf3822a724127b2632596dc45648fdeda0afb)
Paul Berry [Fri, 24 Jun 2011 22:34:04 +0000 (15:34 -0700)]
glsl: Rewrote _mesa_glsl_process_extension to use table-driven logic.
Instead of using a chain of manually maintained if/else blocks to
handle "#extension" directives, we now consult a table that specifies,
for each extension, the circumstances under which it is available, and
what flags in _mesa_glsl_parse_state need to be set in order to
activate it.
This makes it easier to add new GLSL extensions in the future, and
fixes the following bugs:
- Previously, _mesa_glsl_process_extension would sometimes set the
"_enable" and "_warn" flags for an extension before checking whether
the extension was supported by the driver; as a result, specifying
"enable" behavior for an unsupported extension would sometimes cause
front-end support for that extension to be switched on in spite of
the fact that back-end support was not available, leading to strange
failures, such as those in
https://bugs.freedesktop.org/show_bug.cgi?id=38015.
- "#extension all: warn" and "#extension all: disable" had no effect.
Notes:
- All extensions are currently marked as unavailable in geometry
shaders. This should not have any adverse effects since geometry
shaders aren't supported yet. When we return to working on geometry
shader support, we'll need to update the table for those extensions
that are available in geometry shaders.
- Previous to this commit, if a shader mentioned
ARB_shader_texture_lod, extension ARB_texture_rectangle would be
automatically turned on in order to ensure that the types
sampler2DRect and sampler2DRectShadow would be defined. This was
unnecessary, because (a) ARB_shader_texture_lod works perfectly well
without those types provided that the builtin functions that
reference them are not called, and (b) ARB_texture_rectangle is
enabled by default in non-ES contexts anyway. I eliminated this
unnecessary behavior in order to make the behavior of all extensions
consistent.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
3097715d41da4b725b7ce9f9d5bbc0f684cbf0a6)
Paul Berry [Fri, 24 Jun 2011 19:33:30 +0000 (12:33 -0700)]
glsl: Changed extension enable bits to bools.
These were previously 1-bit-wide bitfields. Changing them to bools
has a negligible performance impact, and allows them to be accessed by
offset as well as by direct structure access.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
9c4445de6e69d021491361d884bf172c05189d61)
Marek Olšák [Fri, 15 Jul 2011 18:57:39 +0000 (20:57 +0200)]
prog_optimize: fix a warning that a variable may be uninitialized
(cherry picked from commit
dade65505bdf62da448479e316cc7f4f2da22417)
Signed-off-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 19 Jul 2011 21:20:21 +0000 (14:20 -0700)]
mesa: Bump version to 7.11-rc2
Brian Paul [Tue, 19 Jul 2011 15:29:48 +0000 (09:29 -0600)]
mesa: remove depend files from tarballs
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 14 Jun 2011 23:28:32 +0000 (16:28 -0700)]
glsl: Correctly handle function matching when there are multiple inexact matches
This is a squash cherry pick commit of:
glsl: Find the "closest" signature when there are multiple matches.
Previously, ir_function::matching_signature had a fatal bug: if a
function had more than one non-exact match, it would simply return NULL.
This occured, for example, when looking for max(uvec3, uvec3):
- max(vec3, vec3) -> score 1 (found first)
- max(ivec3, ivec3) -> score 1 (found second...used to return NULL here)
- max(uvec3, uvec3) -> score 0 (exact match...the right answer)
This did not occur for max(ivec3, ivec3) since the second match found
was an exact match.
The new behavior is to return a match with the lowest score. If there
is an exact match, that will be returned. Otherwise, a match with the
least number of implicit conversions is chosen.
Fixes piglit tests max-uvec3.vert and glsl-inexact-overloads.shader_test.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
60eb63a855cb89962f2d5bb91e238ff2d1ab8702)
glsl: Suppress warning from matching_signature change.
gcc isn't smart enough to see that we only look at matched_score after
we've initialized it (because match != NULL happens at the same time)
(cherry picked from commit
b043409adfa6ffa6dc78331258de52f7fa6d59aa)
glsl: Reject ambiguous function calls (multiple inexact matches).
According to the GLSL 1.20 specification, "it is a semantic error if
there are multiple ways to apply [implicit] conversions [...] such that
the call can be made to match multiple signatures."
Fixes a regression caused by
60eb63a855cb89962f2d5bb91e238ff2d1ab8702,
which implemented the wrong policy of finding a "closest" match.
However, this is not a revert, since the original code failed to
continue looking for an exact match once it found two inexact matches.
It's OK to have multiple inexact matches if there's also an exact match.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38971
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
7304909d6537e00252347a10d0bae54ffd77ff91)
Paul Berry [Tue, 12 Jul 2011 19:03:02 +0000 (12:03 -0700)]
glsl: Ensure that sampler declarations are always uniform or "in" parameters.
This brings us into compliance with page 17 (page 22 of the PDF) of
the GLSL 1.20 spec:
"[Sampler types] can only be declared as function parameters or
uniform variables (see Section 4.3.5 "Uniform"). ... [Samplers]
cannot be used as out or inout function parameters."
The spec isn't explicit about whether this rule applies to
structs/arrays containing shaders, but the intent seems to be to
ensure that it can always be determined at compile time which sampler
is being used in each texture lookup. So to avoid creating a
loophole, the rule needs to apply to structs/arrays containing shaders
as well.
Fixes piglit tests spec/glsl-1.10/compiler/samplers/*.frag, and fixes
bug 38987.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38987
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
f07221056e1822187546b76387714b3172f9b2c5)
Paul Berry [Mon, 11 Jul 2011 23:44:13 +0000 (16:44 -0700)]
glsl: Move type_contains_sampler() into glsl_type for later reuse.
The new location, as a member function of glsl_type, is more
consistent with queries like is_sampler(), is_boolean(), is_float(),
etc. Placing the function inside glsl_type also makes it available to
any code that uses glsl_types.
(cherry picked from commit
ddc1c96390b685bb95f7431e862c3a64fcefa085)
Ian Romanick [Wed, 29 Jun 2011 21:52:10 +0000 (14:52 -0700)]
linker: Only over-ride built-ins when a prototype has been seen
The GLSL spec says:
"If a built-in function is redeclared in a shader (i.e., a
prototype is visible) before a call to it, then the linker will
only attempt to resolve that call within the set of shaders that
are linked with it."
This patch enforces this behavior. When a function call is processed
a flag is set in the ir_call to indicate whether the previously seen
prototype is the built-in or not. At link time a call will only bind
to an instance of a function that matches the "want built-in" setting
in the ir_call.
This has the odd side effect that first call to abs() in the shader
below will call the built-in and the second will not:
float foo(float x) { return abs(x); }
float abs(float x) { return -x; }
float bar(float x) { return abs(x); }
This seems insane, but it matches what the spec says.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31744
(cherry picked from commit
66f4ac988d5053c9782d1390541b04f4d9c50078)
Ian Romanick [Wed, 22 Jun 2011 18:35:27 +0000 (11:35 -0700)]
configure.ac: Make --{without,with}-gallium-drivers work as expected
This version is mostly Dan's post to the mesa-dev mailing list on
6/22/2011.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
(cherry picked from commit
db311b45beb60630ad3e3c803631c2b6c1472347)
Kenneth Graunke [Wed, 29 Jun 2011 22:18:55 +0000 (15:18 -0700)]
i965/gen7: Add support for gl_PointCoord.
This is exactly analogous to Eric's Gen6 change in commit
6861a701772eac3a6a7d3136d03efa7ac7e5c026. His explanation:
"This is just like PointSprite overrides, but it's always on for that
attribute."
Fixes glsl-fs-pointcoord and gtf/point_sprites.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
186e37c75454965e1a58298e878a9585f4866749)
Kenneth Graunke [Wed, 29 Jun 2011 22:11:22 +0000 (15:11 -0700)]
i965/gen7: Fix point sprite texture coordinate overrides.
This is exactly analogous to Eric's Gen6 change in commit
f304bb8a5d040d99db47a65813d216d11c66fb47. His explanation:
"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."
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
147d0102952b7c0b16906c08da2ae447ec68185a)
Kenneth Graunke [Wed, 29 Jun 2011 22:05:52 +0000 (15:05 -0700)]
i965/gen7: Refactor SF setup a bit to handle overrides in one place.
This is exactly analogous to Eric's Gen6 change in commit
e7280b16d634e1f434bebbce83996b3d30d0419c.
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
5edb3ddf4191b31b4a4e43a85fe1bfbd62a8cb17)
Kenneth Graunke [Sat, 9 Jul 2011 03:17:50 +0000 (20:17 -0700)]
i965/gen7: Remove gratuitous dirty flags from WM and PS state.
Commit
b46dc45ceef3deb17ba2b0b4300eeb93e9cf7833 claimed that
NEW_POLYGONSTIPPLE is gratuitous, but somehow just changed comments
and whitespace instead of actually removing the flag.
While we're at it, 3DSTATE_PS doesn't appear to need NEW_LINE or
NEW_POLYGON either (those are in 3DSTATE_WM). Also, 3DSTATE_WM
doesn't appear to need BRW_NEW_NR_WM_SURFACES or BRW_NEW_CURBE_OFFSETS
either (those are in 3DSTATE_PS).
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
57b57f6d1c3689a3a44222cb169bfd3e3142a68d)
Henri Verbeet [Sun, 17 Jul 2011 22:42:27 +0000 (00:42 +0200)]
glx: Avoid calling __glXInitialize() in driReleaseDrawables().
This fixes a regression introduced by commit
a26121f37530619610a78a5fbe5ef87e44047fda (fd.o bug #39219).
Since the __glXInitialize() call should be unnecessary anyway, this is
probably a nicer fix for the original problem too.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: padfoot@exemail.com.au
(cherry picked from commit
0f20e2e18f902b4319851643e1775a18c2aacb3d)
Chad Versace [Mon, 18 Jul 2011 07:37:45 +0000 (00:37 -0700)]
intel: Fix stencil buffer to be W tiled
Until now, the stencil buffer was allocated as a Y tiled buffer, because
in several locations the PRM states that it is. However, it is actually
W tiled. From the PRM, 2011 Sandy Bridge, Volume 1, Part 2, Section
4.5.2.1 W-Major Format:
W-Major Tile Format is used for separate stencil.
The GTT is incapable of W fencing, so we allocate the stencil buffer with
I915_TILING_NONE and decode the tile's layout in software.
This fix touches the following portions of code:
- In intel_allocate_renderbuffer_storage(), allocate the stencil
buffer with I915_TILING_NONE.
- In intel_verify_dri2_has_hiz(), verify that the stencil buffer is
not tiled.
- In the stencil buffer's span functions, the tile's layout must be
decoded in software.
This commit mutually depends on the xf86-video-intel commit
dri: Do not tile stencil buffer
Author: Chad Versace <chad@chad-versace.us>
Date: Mon Jul 18 00:38:00 2011 -0700
On Gen6 with separate stencil enabled, fixes the following Piglit tests:
bugs/fdo23670-drawpix_stencil
general/stencil-drawpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-copypixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-drawpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-readpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-copypixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-drawpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-readpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-copypixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-drawpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-readpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-copypixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-drawpixels
spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-readpixels
spec/EXT_packed_depth_stencil/fbo-stencil-GL_DEPTH24_STENCIL8-copypixels
spec/EXT_packed_depth_stencil/fbo-stencil-GL_DEPTH24_STENCIL8-readpixels
spec/EXT_packed_depth_stencil/readpixels-24_8
Note: This is a candidate for the 7.11 branch.
Signed-off-by: Chad Versace <chad@chad-versace.us>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
f7dbcba280e4397cadb14f230aa925b4143cdde4)
Vadim Girlin [Sat, 16 Jul 2011 00:58:58 +0000 (04:58 +0400)]
r600g: fix corner case checks for the queries
Christoph Bumiller [Mon, 18 Jul 2011 11:48:19 +0000 (13:48 +0200)]
nv50,nvc0: add correct storage type for Z32_FLOAT
Christoph Bumiller [Mon, 11 Jul 2011 09:31:18 +0000 (11:31 +0200)]
nv50,nvc0: don't advertise unaligned texture format support
Because we don't support them.
For instance, R32G32B32 is not R32G32B32X32 as was assumed.
Add support for R8G8B8X8_UNORM instead of R8G8B8_UNORM surfaces.
Vadim Girlin [Fri, 15 Jul 2011 03:22:20 +0000 (07:22 +0400)]
r600g: fix queries and predication
Use all zpass data for predication instead of the last block only.
Use query buffer as a ring instead of reusing the same area
for each new BeginQuery. All query buffer offsets are in bytes
to simplify offsets math.
Alex Deucher [Fri, 15 Jul 2011 14:55:02 +0000 (10:55 -0400)]
r600c/g: add new NI pci ids
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Chia-I Wu [Wed, 13 Jul 2011 07:25:46 +0000 (15:25 +0800)]
targets/egl-static: fix a linking error
rbug is always linked in and it needs libpthread.
(cherry picked from commit
5fe5d236c26b3b2428bc7395304e40cf21d3d3e1)
Eric Anholt [Tue, 12 Jul 2011 22:31:39 +0000 (15:31 -0700)]
i915: Add support for gl_FragData[0] for output color.
We advertised ARB_draw_buffers, but either fell back to software when
using this output, or assertion failed. Fixes glsl-fs-fragdata-1, and
failures in some webgl conformance tests.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39024
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34906
(cherry picked from commit
556a47a2621073185be83a0a721a8ba93392bedb)
Eric Anholt [Mon, 11 Jul 2011 23:50:06 +0000 (16:50 -0700)]
i915: Fix NPOT compressed textures on 915.
We were failing at rounding, misplacing the non-baselevels. Fixes:
3DFX_texture_compression_FXT1/fbo-generate-mipmaps
ARB_texture_compression/fbo-generate-mipmaps
EXT_texture_compression_s3tc/fbo-generate-mipmaps
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
f2fd0d63046c41559c5dfca9ebdc5d33c0ae4177)
Eric Anholt [Mon, 11 Jul 2011 18:32:04 +0000 (11:32 -0700)]
i915: Fix map/unmap mismatches from leaving INTEL_FALLBACK during TNL.
The first rendering after context create didn't know of the color
buffer yet, triggering a sw fallback. The intel_prepare_render() from
intelSpanRenderStart then found the buffer and turned off fallbacks,
but intelSpanRenderFinish was never called and things were left
mapped. By checking buffers before making the call on whether to do
the fallback pipeline or not, we avoid the fallback change inside of
the rendering pipeline.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31561
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
6e6b38860488a0b2b282866f095cea9860503a14)
Eric Anholt [Fri, 8 Jul 2011 00:08:04 +0000 (17:08 -0700)]
i965: Fix fp-dst-aliasing-[12].vpfp.
There's no pretty way to avoid the overwriting of the src operands, so
just use a temporary destination and rely on the MOV optimization.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
46a7639174d2c55c30ec24b179cbef059fb3ca43)
Eric Anholt [Thu, 7 Jul 2011 23:41:20 +0000 (16:41 -0700)]
i965: Fix fp-lit-src-equals-dst.
We were stomping over the source for the body of the LIT instruction
when doing the MOV of 1.0 to the uninteresting channels.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
e3ea5bc08e32119d05bce543c07c61ce93869e60)
Eric Anholt [Wed, 29 Jun 2011 18:37:35 +0000 (11:37 -0700)]
intel: Remove gratuitous context checks in intel_delete_renderbuffer().
Even if we don't have a current context, if we're freeing the rb we
should free its region (and BO). The renderbuffer unreference checks
appear to be just cargo-cult from the region unreference code.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
007c2d6cd2f6b206564689ac12a3e51aaae242bc)
Eric Anholt [Wed, 29 Jun 2011 18:09:49 +0000 (11:09 -0700)]
intel: Allow intel_region_reference() with *dst != NULL.
This should help us avoid leaking regions in region reference code by
making the API more predictable.
Reviewed-by: Chad Versace <chad@chad-versace.us>
(cherry picked from commit
036b74a7f8adc745c7af089129f070b8e5b8f4bd)
(cherry picked from commit
d8f65c07e9f3a5948c8bee95482bcab651b33c01)
Eric Anholt [Wed, 6 Jul 2011 04:59:33 +0000 (21:59 -0700)]
glsl: Fix make clean for dricore.
(cherry picked from commit
abbbd14dd440cfbbe8b42279cf95c30eec5b495d)
Eric Anholt [Sun, 19 Jun 2011 19:04:46 +0000 (12:04 -0700)]
i965: Reissue PIPELINE_POINTERS and BINDING_TABLE_POINTERS on SBA change.
This was a requirement we didn't run into until we started using
STATE_BASE_ADDRESS for instruction data.
(cherry picked from commit
a09c5c2e3053c48a33134cf28229105bfef52e6f)
Eric Anholt [Sun, 19 Jun 2011 18:33:40 +0000 (11:33 -0700)]
i965/gen6: Fix scissors using invalid STATE_BASE_ADDRESS.
The scissor state was incorrectly in a .prepare function instead of
.emit, so the packet would end up in the batch before the
STATE_BASE_ADDRESS. It appears that this doesn't actually hurt, as
the scissor address gets dereferenced according to the current SBA at
draw time.
(cherry picked from commit
cd7bfd5d44f543246faa7ad6ff2f8309189be963)
Stéphane Marchesin [Wed, 13 Jul 2011 18:59:10 +0000 (11:59 -0700)]
i915g: don't try to check if a NULL buffer is busy.
Alex Deucher [Tue, 12 Jul 2011 16:00:10 +0000 (12:00 -0400)]
r600g: emit SQ_LDS_RESOURCE_MGMT
Need to be initialized to a reasonable value as
compute code may change it.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=39119
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Brian Paul [Mon, 11 Jul 2011 14:00:59 +0000 (08:00 -0600)]
glx: add a few missing glXChooseFBConfig() attributes
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=38842
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
d60880db35fd11d9348ce4b2bfbcc9325d2ebf91)
Brian Paul [Fri, 8 Jul 2011 18:59:20 +0000 (12:59 -0600)]
glext.h: update to version 71
(cherry picked from commit
bb0d5cae002f288f822dc9c90e6cd4eaf660c464)
Benjamin Franzke [Sat, 2 Jul 2011 11:46:42 +0000 (13:46 +0200)]
configure: Require libudev for drm & wayland egl platforms
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
7ed1826e2e2a5b5c4840821c92ef7273efe32e24)
Benjamin Franzke [Sat, 2 Jul 2011 11:46:09 +0000 (13:46 +0200)]
configure: Fix typo in gbm check for egl drm platform
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
9b8cd499303d9bcb60f40ef14553cb38cea6a897)
Benjamin Franzke [Sat, 2 Jul 2011 11:45:14 +0000 (13:45 +0200)]
configure: Enable st/gbm if st/egl has drm platform
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
b18b2994eff2f51588abe29c7a2209220c9ee9c5)
Benjamin Franzke [Sat, 2 Jul 2011 11:41:35 +0000 (13:41 +0200)]
egl_dri2: Fix compilation if udev devel files are not installed
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
b2d6375e6a64ac12f35f8a611ebf2016e4a6dd42)
Benjamin Franzke [Mon, 27 Jun 2011 08:23:34 +0000 (10:23 +0200)]
egl: Fix Terminate with shared gbm screens
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
992680c8b46d72cbc61888b8439d815bff42986c)
Marek Olšák [Sun, 10 Jul 2011 18:03:05 +0000 (20:03 +0200)]
swrast: fix depth/stencil blits when there's no colorbuffer
NOTE: This is a candidate for the 7.10 and 7.11 branches.
(cherry picked from commit
d1214cca084f277b5acc913490d354edbd4b990f)
Marek Olšák [Sun, 10 Jul 2011 18:01:33 +0000 (20:01 +0200)]
mesa: return early if mask is cleared to zero in BlitFramebuffer
From ARB_framebuffer_object:
If a buffer is specified in <mask> and does not exist in both the
read and draw framebuffers, the corresponding bit is silently
ignored.
(cherry picked from commit
83478e5d5944e1fc320e8cfb10ba75055bbea3fd)
Vadim Girlin [Sat, 9 Jul 2011 15:39:43 +0000 (19:39 +0400)]
r600g: LIT: clamp negative src.y to 0
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39083
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Eric Anholt [Fri, 8 Jul 2011 22:30:48 +0000 (15:30 -0700)]
i965/gen4: Fix GPU hangs since the program streaming change.
This was tricky. We were doing a use-before-initialize of
grf_reg_count, but the value usually got overwritten anyway -- when we
didn't have to do a relocation (typical), or on gen5 when we didn't
have relocations at all.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38771
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
d03fdc4cdefdfdc5b59547945704c6037a5061c7)
Ian Romanick [Sat, 9 Jul 2011 01:47:21 +0000 (18:47 -0700)]
mesa: Fix the parsers build rule so that 'make tarballs' can work
You'd think that with all the commit messages about adding stuff to
tarballs or fixing 'make tarballs' that someone would have noticed
that it was completely broken for 4 months (
3158cc7).
Ian Romanick [Sat, 9 Jul 2011 01:26:39 +0000 (18:26 -0700)]
mesa: Bump version to 7.11-rc1
Ian Romanick [Thu, 2 Jun 2011 19:42:48 +0000 (12:42 -0700)]
glsl: Fix depth unbalancing problem in if-statement flattening
Previously, if max_depth were 1, the following code would see the
first if-statement (correctly) not get flattened, but the second
if-statement would (incorrectly) get flattened:
void main()
{
if (a)
gl_Position = vec4(0);
if (b)
gl_Position = vec4(1);
}
This is because the visit_leave(ir_if*) method would not decrement the
depth before returning on the first if-statement.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
d2c6cef18aa37d197eb323a0795969d271d02819)
Vadim Girlin [Fri, 8 Jul 2011 02:19:37 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_toggle_neg helper and fix SUB & LRP
SUB & LRP instructions should toggle NEG bit instead of setting it,
otherwise e.g. "SUB a,b,-1" is translated as "ADD a,b,-1"
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Fri, 8 Jul 2011 02:19:36 +0000 (06:19 +0400)]
r600g: introduce r600_bc_src_set_abs helper and fix LOG
LOG instruction should use absolute values of source operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:09 +0000 (05:29 +0400)]
r600g: RSQ: clear NEG for operand
Need to clear NEG bit because it applies after ABS, e.g. "RSQ ..., -1"
uses -|1| as operand.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Vadim Girlin [Wed, 6 Jul 2011 01:29:08 +0000 (05:29 +0400)]
r600g: LIT: swap MUL_LIT operands to fix 0^0
For 0^0 case result of "LOG_CLAMPED ...,0" is -MAX_FLOAT, and then result of
"MUL_LIT ...,0,-MAX_FLOAT,..." is -MAX_FLOAT instead of 0 because of special
src1 checks for -MAX_FLOAT. So swap src0/1:
"MUL_LIT ...,-MAX_FLOAT,0,..." to get expected 0, then result of
"EXP_IEEE ...,0" is 1 as expected for LIT.
Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Brian Paul [Thu, 7 Jul 2011 22:47:59 +0000 (16:47 -0600)]
glsl: use casts to silence warning
(cherry picked from commit
7eb7d67d50fccb64248d1fc6f490895048d7d32e)
Brian Paul [Fri, 8 Jul 2011 14:03:40 +0000 (08:03 -0600)]
gallivm: Fix build with llvm-3.0
LLVM 3.0svn changes pretty rapidly. The change in
Target->createMCInstPrinter() signature which inspired commits
40ae214067673edbda79371969d1730b6194d83e and
92e29dc5b0474c073b0f05d60629fc6c3decfca4 has been reverted.
Signed-off-by: Gustaw Smolarczyk <wielkiegie@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
fc98444bd58960e6cab28423365923bc7e7af3e1)
Conflicts:
src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
Marek Olšák [Mon, 27 Jun 2011 16:57:59 +0000 (18:57 +0200)]
st/mesa: handle float formats in st_format_datatype
NOTE: This is a candidate for the 7.11 branch.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
7de28e80dcd4239a780b0f5fdc6e61e6e56a68aa)
Marek Olšák [Mon, 27 Jun 2011 17:01:25 +0000 (19:01 +0200)]
st/mesa: use the first non-VOID channel in st_format_datatype
Otherwise PIPE_FORMAT_X8B8G8R8_UNORM and friends would fail.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
292148dc4b18958d4447df7596311bd2f09fd44f)
Stéphane Marchesin [Wed, 6 Jul 2011 09:19:48 +0000 (02:19 -0700)]
i915g: Improve flushing using heuristics.
Stéphane Marchesin [Mon, 4 Jul 2011 02:43:19 +0000 (19:43 -0700)]
i915g: Move back to the old method for target format fixup.
Conflicts:
src/gallium/drivers/i915/i915_state_emit.c
Eric Anholt [Wed, 6 Jul 2011 18:31:00 +0000 (11:31 -0700)]
intel: Fix use of freed buffer if glBitmap is called after a swap.
Regions looked up from the framebuffer are invalid after
intel_prepare_render().
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30266
Tested-by: Thomas Jones <thomas.jones@utoronto.ca>
(cherry picked from commit
066bee64e1611093c7e641ba77bbd43f70d08cec)
Paul Berry [Tue, 28 Jun 2011 16:42:24 +0000 (09:42 -0700)]
glsl: permit explicit locations on fragment shader outputs, not inputs
From the OpenGL docs for GL_ARB_explicit_attrib_location:
This extension provides a method to pre-assign attribute locations to
named vertex shader inputs and color numbers to named fragment shader
outputs.
This was accidentally implemented for fragment shader inputs. This
patch fixes it to apply to fragment shader outputs.
Fixes piglit tests
spec/ARB_explicit_attrib_location/1.{10,20}/compiler/layout-{01,03,06,07,08,09,10}.frag
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
(cherry picked from commit
b078aad8ab22d840456688480a8c27d4664297ce)
Ian Romanick [Tue, 28 Jun 2011 00:59:58 +0000 (17:59 -0700)]
linker: Assign locations for fragment shader output
Fixes an assertion failure in the piglib out-01.frag
ARB_explicit_attrib_location test. The locations set via the layout
qualifier in fragment shader were not being applied to the shader
outputs. As a result all of these variables still had a location of
-1 set.
This may need some more work for pre-3.0 contexts. The problem is
dealing with generic outputs that lack a layout qualifier. There is
no way for the application to specify a location
(glBindFragDataLocation is not supported) or query the location
assigned by the linker (glGetFragDataLocation is not supported).
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38624
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Vinson Lee <vlee@vmware.com>
(cherry picked from commit
d32d4f780f9dad122adb63086da266aec6e88850)
Ian Romanick [Sat, 25 Jun 2011 00:30:41 +0000 (17:30 -0700)]
glsl: Don't choke when printing an anonymous function parameter
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
174cef7fee7d400fc89a3ce68b7791d2aa3eb90f)
Ian Romanick [Sat, 25 Jun 2011 00:12:31 +0000 (17:12 -0700)]
ir_to_mesa: Allocate temporary instructions on the visitor's ralloc context
And don't delete them. Let ralloc clean them up. Deleting the
temporary IR leaves dangling references in the prog_instruction. That
results in a bad dereference when printing the IR with MESA_GLSL=dump.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38584
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
dbda466fc05a6262ba857a7887e16347cf3d3e96)
Ian Romanick [Mon, 27 Jun 2011 23:33:13 +0000 (16:33 -0700)]
glsl: Track initial mask in constant propagation live set
The set of values initially available (before any kills) must be
tracked with each constant in the set. Otherwise the wrong component
can be selected after earlier components have been killed.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=37383
Reviewed-by: Eric Anholt <eric@anholt.net>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Cc: Matthias Bentrup <matthias.bentrup@googlemail.com>
(cherry picked from commit
0eb97979584b73907327eebc547302e6b8d8976a)
Vadim Girlin [Mon, 4 Jul 2011 14:30:42 +0000 (18:30 +0400)]
r600g: fix buffer overflow check in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:41 +0000 (18:30 +0400)]
r600g: fix bo map usage flags in r600_query_begin
Vadim Girlin [Mon, 4 Jul 2011 14:30:40 +0000 (18:30 +0400)]
r600g: reduce flushes for queries
Vadim Girlin [Mon, 4 Jul 2011 14:30:39 +0000 (18:30 +0400)]
r600g: fix buffer offset in r600_query_begin
Chia-I Wu [Sat, 2 Jul 2011 08:57:30 +0000 (17:57 +0900)]
egl: add copyright notices
The list of copyright holders could be incomplete. Please update
directly or notify me if your name is missing.
(cherry picked from commit
f2001df508fda599a18b3586d2775e970a3db13a)
Vadim Girlin [Wed, 29 Jun 2011 12:29:18 +0000 (16:29 +0400)]
r600g: fix check for empty cs
Chia-I Wu [Thu, 30 Jun 2011 01:23:50 +0000 (10:23 +0900)]
target/egl-static: fix a compiler warning
(cherry picked from commit
3e3df5fcd19671260fdd983e1ebfaca7826242a6)
Chia-I Wu [Tue, 28 Jun 2011 06:23:20 +0000 (15:23 +0900)]
targets/egl-static: fix library search order
Use
$(MKLIB) -ldflags '-L$(TOP)/$(LIB_DIR)'
instead of
$(MKLIB) -L$(TOP)/$(LIB_DIR)
to make sure the local library path appears before system's.
(cherry picked from commit
24137afb315007c4e686b494d4565c5bd3d2d97f)
Chia-I Wu [Sat, 25 Jun 2011 22:36:26 +0000 (07:36 +0900)]
targets/gbm: attemp to fix unresolved symbols
Move system libraries (usually .so) out of --start-group / --end-group
pair. Add possiblly missing archives, defines, and shared libraries.
(cherry picked from commit
56ec8e17d3a132cd43a3d75a653a034b05cbd918)
Chia-I Wu [Sat, 25 Jun 2011 09:09:18 +0000 (18:09 +0900)]
targets/egl-static: do not use DRI_LIB_DEPS
It brings in libraries that are not necessarily needed.
(cherry picked from commit
1e9f0b17365072ef672a7777fddde9d973530581)
Chia-I Wu [Sat, 25 Jun 2011 09:28:20 +0000 (18:28 +0900)]
egl: fix EGL_MATCH_NATIVE_PIXMAP
EGL_MATCH_NATIVE_PIXMAP is valid for eglChooseConfig, but invalid for
eglGetConfigAttrib.
(cherry picked from commit
8ea5330200e314f9f7de763b1951656c92caa857)
Chia-I Wu [Tue, 28 Jun 2011 01:22:01 +0000 (10:22 +0900)]
st/egl: update fbdev backend
Considering fbdev as an in-kernel window system,
- opening a device opens a connection
- there is only one window: the framebuffer
- fb_var_screeninfo decides window position, size, and even color format
- there is no pixmap
Now EGL is built on top of this window system. So we should have
- the fd as the handle of the native display
- reject all but one native window: NULL
- no pixmap support
modeset support is still around, but it should be removed soon.
(cherry picked from commit
aa281dd3924cf76e24c0e8cbd971f58d082cd4cd)
Chia-I Wu [Mon, 27 Jun 2011 02:47:27 +0000 (11:47 +0900)]
st/d3d1x: fix for st/egl native.h interface change
The interface was changed in
73df31eedd0f33c8a9907855cb247c8f87964c48.
(cherry picked from commit
3a07d9594a60dd84464b30b2d9ffdfc4f219bc5b)
Chia-I Wu [Sat, 25 Jun 2011 23:02:13 +0000 (08:02 +0900)]
st/egl: fix a compile error
It is triggered when --with-driver=xlib is specified.
(cherry picked from commit
ed47d65c7c05d7dd5a5b4cafaa32afbd4fff0bef)
Chia-I Wu [Sat, 25 Jun 2011 05:52:57 +0000 (14:52 +0900)]
st/egl: reorganize backend initialization
Remove set_event_handler() and pass the event handler with
native_get_XXX_platform(). Add init_screen() so that the pipe screen is
created later. This way we don't need to pass user_data to
create_display().
(cherry picked from commit
73df31eedd0f33c8a9907855cb247c8f87964c48)
Kenneth Graunke [Wed, 29 Jun 2011 17:53:51 +0000 (10:53 -0700)]
i965/gen7: Add missing ! to brw->gs.prog_active assertion.
A typo in commit
c173541d9769 accidentally removed the !.
It's supposed to assert that there is _not_ an active GS program.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38762
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry-picked from commit
5ddc518401ae69ad92218643f00ef50617a0f11d)
Emil Velikov [Tue, 28 Jun 2011 17:47:41 +0000 (18:47 +0100)]
st/mesa: Use correct internal target
Commit
1a339b6c(st/mesa: prefer native texture formats when possible)
introduced two new arguments to the st_choose_format() functions.
This patch fixes the order and passes the correct internal_target
rather than GL_NONE
NOTE: This is a candidate for the 7.11 branch
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
9b5c538726d279c79c1c74047fe19a6caab5321e)
Andre Maasikas [Mon, 27 Jun 2011 15:03:27 +0000 (18:03 +0300)]
st/mesa: fix overwriting gl_format with pipe_format since
9d380f48
fixes assert later on in texcompress2/r600g
Signed-off-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit
19789e403ca3d0171d18f3c862738225902315e9)
Marek Olšák [Sat, 25 Jun 2011 05:20:20 +0000 (07:20 +0200)]
r300g: drop support for ARGB, ABGR, XRGB, XBGR render targets
Blending and maybe even alpha-test don't work with those formats.
Only supporting RGBA, BGRA, RGBX, BGRX.
NOTE: This is a candidate for the 7.10 and 7.11 branches.
(cherry picked from commit
bc517d64dad41bc66ab5cc1c82d8d8111145d8a1)
Brian Paul [Sat, 25 Jun 2011 12:20:32 +0000 (06:20 -0600)]
Revert "Fix 24bpp software rendering"
This reverts commit
c0c0bb6cb140825f5bab3c40c0c9c0ec575fbc76.
Stéphane Marchesin [Sat, 25 Jun 2011 02:51:25 +0000 (19:51 -0700)]
i915g: always upload the vs constants.
This fixes a crash in llvm draw.
Eric Anholt [Fri, 24 Jun 2011 22:40:51 +0000 (15:40 -0700)]
i965/gen5: Fix grf_used calculation for 16-wide.
If we happened to allocate a texture result (or other vector) to the
highest hardware register slot, and we were in 16-wide, we would
under-count the registers used and potentially wrap around to g0 if
that allocation crossed a 16-register block boundary. Bad rendering
and hangs ensued.
Tested-by: Ian Romanick <idr@freedesktop.org>
Stéphane Marchesin [Sat, 25 Jun 2011 00:18:12 +0000 (17:18 -0700)]
i915g: add fake occlusion queries.
Those always return 0, but at least we don't crash when exposing GL 2.0.
Stéphane Marchesin [Fri, 24 Jun 2011 23:41:09 +0000 (16:41 -0700)]
i915g: Don't do shader fixup if no surface is bound.
Stéphane Marchesin [Fri, 24 Jun 2011 23:18:58 +0000 (16:18 -0700)]
i915g: Fix point sprites.