OSDN Git Service
Ian Romanick [Thu, 28 Jul 2011 23:08:42 +0000 (16:08 -0700)]
mesa: Bump version to 7.11-rc4
Kenneth Graunke [Tue, 26 Jul 2011 04:13:43 +0000 (21:13 -0700)]
i965: Remove the now unused intel_renderbuffer::draw_offset field.
The previous commit removed the last use of this field.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
f73caddd3339d284556036d031ab30ce8057a510)
Kenneth Graunke [Tue, 26 Jul 2011 00:06:13 +0000 (17:06 -0700)]
i965: Check actual tile offsets in Gen4 miptree workaround.
The purpose of the (irb->draw_offset & 4095) != 0 check was to ensure
that we don't have XYy offsets into a tile, since Gen4 hardware doesn't
support that. However, it's insufficient: there are cases where
draw_offset & 4095 is 0 but we still have a Y-offset. This leads to an
assertion failure in brw_update_renderbuffer_surface with tile_y != 0.
Instead, simply call intel_renderbuffer_tile_offsets to compute the
actual X/Y offsets and check if either are non-zero. This makes both
the workaround and the assertion check the same things.
Fixes piglit test fbo-generatemipmap-formats, and should also fix
bugs #34009 and #39487.
NOTE: This is a candidate for stable release branches.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34009
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39487
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad@chad-versace.us>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
15c0bc5eefc89bec537e412c02965f201fb1c011)
Kenneth Graunke [Mon, 25 Jul 2011 21:27:07 +0000 (14:27 -0700)]
i965/gen4: Fix message parameter loading for 1D TXD sampling.
We were neglecting to load dvdx and dvdy. v is not optional.
Fixes glslparsertests tex-grad-0[12345].frag on Broadwater/Crestline.
(We still need an execution test using sampler1D.)
NOTE: This is a candidate for the 7.11 branch.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
3e1fd13f605f16e8b48f3a9b71910a3c66eb84b5)
Fredrik Höglund [Tue, 19 Jul 2011 21:25:32 +0000 (15:25 -0600)]
st/mesa: fix the texture format in st_context_teximage
Commit
1a339b6c71ebab6e1a64f05b2e133022d3bbcd15 made
st_ChooseTextureFormat map GL_RGBA with type GL_UNSIGNED_BYTE
to PIPE_FORMAT_A8B8G8R8_UNORM.
The image format for ARGB pixmaps is PIPE_FORMAT_B8G8R8A8_UNORM
however. This mismatch caused the texture to be recreated in
st_finalize_texture.
NOTE: This is a candidate for the 7.11 branch.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39209
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
Ian Romanick [Tue, 26 Jul 2011 19:06:29 +0000 (12:06 -0700)]
mesa: Ensure that r300 compiler files only appear once in the tarballs
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Jeremy Huddleston <jeremyhu@apple.com>
Cc: Andreas Radke <a.radke@arcor.de>
Ian Romanick [Tue, 26 Jul 2011 02:47:49 +0000 (19:47 -0700)]
mesa: Bump version to 7.11-rc3
Ian Romanick [Tue, 26 Jul 2011 02:47:25 +0000 (19:47 -0700)]
mesa: Use --dereference to avoid symlinks in tarballs
Eric Anholt [Mon, 25 Jul 2011 22:39:03 +0000 (15:39 -0700)]
i965/fs: Fix MRT drawing since the m0->m2 move for shader debug.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit
3daa2d97eb13f41de4cbab9301a167be85d48642)
Eric Anholt [Fri, 22 Jul 2011 17:56:10 +0000 (10:56 -0700)]
i965: Fix many of the trivial WebGL demos that broke due to IB optimization.
The index buffer state emit only occurred if there was an IB in place
and we were in either a new batch or a new IB state. But because we
only flagged new IB state if IB state changed from the last IB state
we calculated, we could simply never emit IB state after batchbuffer
wraps if the first draw didn't use the IB and we didn't actually
change the IB.
Fixes piglit glx-multi-context-ib-1.
(cherry picked from commit
818db3848bfaa002d0e7cf6b9b615a31eb82ba25)
Eric Anholt [Mon, 25 Jul 2011 18:50:27 +0000 (11:50 -0700)]
i965: Emit texture cache flushes on gen6 along with render cache flushes.
It turns out that internally the texture cache gets flushed in a
couple of cases, particularly around 2D operations mixed with 3D. In
almost all cases one of those happens between rendering to an
FBO-attached texture and rendering from that texture. However, as of
the next patch, glean tfbo (and the new fbo-flushing-2 test) would
manage to get stale texture values because one of those flushes didn't
occur. The intention of this code was always to get the render cache
cleared and ready to be used from the sampler cache (and it does on <=
gen4), so this just catches gen5 up.
This patch was also tested to fix fbo-flushing on gen7.
(cherry picked from commit
185868c9c2e6a31a7313df2dbe29490547b65f61)
Paul Berry [Fri, 22 Jul 2011 21:05:52 +0000 (14:05 -0700)]
i965: vs optimization fix: Check val.{negate,abs} in accumulator_contains()
When emitting a MAC instruction in a vertex shader, brw_vs_emit()
calls accumulator_contains() to determine whether the accumulator
already contains the appropriate addend; if it does, then we can avoid
emitting an unnecessary MOV instruction.
However, accumulator_contains() wasn't checking the val.negate or
val.abs flags. As a result, if the desired value was the negation, or
the absolute value, of what was already in the accumulator, we would
generate an incorrect shader.
Fixes piglit test vs-refract-vec4-vec4-float.
Tested on Gen5 and Gen6.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
d92463d5dc42aca09a54588c322fc60582cf9131)
Kenneth Graunke [Thu, 12 May 2011 11:02:32 +0000 (04:02 -0700)]
i965/gen7: Fix shadow sampling in the old brw_wm_emit backend.
On Ivybridge, the shadow comparitor goes in the first slot, rather than
at the end. It's not necessary to send u, v, and r.
Fixes tests texturing/texdepth and glean/fbo.
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
572f6318954f31fcf3d396ac5df8e9eff3f37c74)
Kenneth Graunke [Fri, 22 Jul 2011 04:17:10 +0000 (21:17 -0700)]
i965/fs: Clear result before visiting shadow comparitor and LOD info.
Commit
53c89c67f33639afef951e178f93f4e29acc5d53 ("i965: Avoid generating
MOVs for assignments of expressions.") added the line "this->result =
reg_undef" all over the code. Unfortunately, since Eric developed his
patch before I landed Ivybridge support, he missed adding it to
fs_visitor::emit_texture_gen7() after rebasing.
Furthermore, since I developed TXD support before Eric's patch, I
neglected to add it to the gradient handling when I rebased.
Neglecting to set this causes the visitor to use this->result as storage
rather than generating a new temporary. These missing statements
resulted in the same register being used to store several different
values.
Fixes the following piglit tests on Ivybridge:
- glsl-fs-shadow2dproj.shader_test
- glsl-fs-shadow2dproj-bias.shader_test
NOTE: This is a candidate for the 7.11 branch.
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
156cef0fbacf242e8fc67e39ab964e5f8f3739cb)
Ian Romanick [Mon, 18 Jul 2011 23:25:33 +0000 (16:25 -0700)]
glsl: Treat ir_dereference_array of non-var as a constant for lowering
Previously the code would just look at deref->array->type to see if it
was a constant. This isn't good enough because deref->array might be
another ir_dereference_array... of a constant. As a result,
deref->array->type wouldn't be a constant, but
deref->variable_referenced() would return NULL. The unchecked NULL
pointer would shortly lead to a segfault.
Instead just look at the return of deref->variable_referenced(). If
it's NULL, assume that either a constant or some other form of
anonymous temporary storage is being dereferenced.
This is a bit hinkey because most drivers treat constant arrays as
uniforms, but the lowering pass treats them as temporaries. This
keeps the behavior of the old code, so this change isn't making things
worse.
Fixes i965 piglit:
vs-temp-array-mat[234]-index-col-rd
vs-temp-array-mat[234]-index-col-row-rd
vs-uniform-array-mat[234]-index-col-rd
vs-uniform-array-mat[234]-index-col-row-rd
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
156f85336f80d542569f0b0182bd27c7f3218e70)
Ian Romanick [Thu, 21 Jul 2011 01:07:50 +0000 (18:07 -0700)]
i965: When emitting a src/dst read of an output, keep the swizzle and neg
Fixes i965 piglit vs-varying-array-mat[234]-row-rd.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
1d3f09f15998c60326bf6c53a8d32c82496264ae)
Ian Romanick [Wed, 20 Jul 2011 23:04:17 +0000 (16:04 -0700)]
i965: When emitting a src/dst write of an output, keep the write mask
Fixes i965 piglit:
vs-varying-array-mat[234]-col-row-wr
vs-varying-array-mat[234]-index-col-row-wr
vs-varying-array-mat[234]-index-row-wr
vs-varying-array-mat[234]-row-wr
vs-varying-mat[234]-col-row-wr
vs-varying-mat[234]-row-wr
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
337e2dfad0bcd567755272271abd2593a1d0fd1f)
Ian Romanick [Thu, 21 Jul 2011 01:02:17 +0000 (18:02 -0700)]
prog_optimize: Set unused regs to PROGRAM_UNDEFINED after CMP->MOV conversion
Leaving the unused registers with other values caused assertion
failures and other problems in places that blindly iterate over all
sources.
brw_vs_emit.c:1381: get_src_reg: Assertion `c->regs[file][index].nr !=
0' failed.
Fixes i965 piglit:
vs-uniform-array-mat[234]-col-row-rd
vs-uniform-array-mat[234]-index-col-row-rd
vs-uniform-array-mat[234]-index-row-rd
vs-uniform-mat[234]-col-row-rd
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
fbeb68e880318808f90c779cd3f8b8c4160eecf8)
Ian Romanick [Mon, 18 Jul 2011 06:35:26 +0000 (23:35 -0700)]
ir_to_mesa: Copy reladdr in src_reg(dst_reg) constructor
Fixes i965 piglit:
vs-temp-array-mat[234]-col-row-wr
vs-temp-array-mat[234]-index-col-row-wr
vs-temp-array-mat[234]-index-row-wr
vs-temp-mat[234]-col-row-wr
Fixes swrast piglit:
fs-temp-array-mat[234]-col-row-wr
fs-temp-array-mat[234]-index-col-row-wr
fs-temp-array-mat[234]-index-row-wr
fs-temp-mat[234]-col-row-wr
vs-temp-array-mat[234]-col-row-wr
vs-temp-array-mat[234]-index-col-row-wr
vs-temp-array-mat[234]-index-row-wr
vs-temp-mat[234]-col-row-wr
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
f7cd9a858c043e609fcdbf9ac9dfc1ef7ad002bf)
Ian Romanick [Mon, 18 Jul 2011 06:15:54 +0000 (23:15 -0700)]
ir_to_mesa: Add each relative address to the previous
This fixes many cases of accessing arrays of matrices using
non-constant indices at each level.
Fixes i965 piglit:
vs-temp-array-mat[234]-index-col-rd
vs-temp-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-wr
vs-uniform-array-mat[234]-index-col-rd
Fixes swrast piglit:
fs-temp-array-mat[234]-index-col-rd
fs-temp-array-mat[234]-index-col-row-rd
fs-temp-array-mat[234]-index-col-wr
fs-uniform-array-mat[234]-index-col-rd
fs-uniform-array-mat[234]-index-col-row-rd
fs-varying-array-mat[234]-index-col-rd
fs-varying-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-rd
vs-temp-array-mat[234]-index-col-row-rd
vs-temp-array-mat[234]-index-col-wr
vs-uniform-array-mat[234]-index-col-rd
vs-uniform-array-mat[234]-index-col-row-rd
vs-varying-array-mat[234]-index-col-rd
vs-varying-array-mat[234]-index-col-row-rd
vs-varying-array-mat[234]-index-col-wr
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
d6e1a8f71437d4a65e65f93271b2892dd62b0d23)
Ian Romanick [Mon, 18 Jul 2011 00:35:00 +0000 (17:35 -0700)]
glsl: When lowering non-constant vector indexing, respect existing conditions
If the non-constant index was in the LHS of an assignment, any
existing condititon on that assignment would be lost.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
601428d2bbcf650c746f7a10b47228948f0ea912)
Ian Romanick [Mon, 18 Jul 2011 00:33:26 +0000 (17:33 -0700)]
glsl: When lowering non-constant array indexing, respect existing conditions
If the non-constant index was in the LHS of an assignment, any
existing condititon on that assignment would be lost.
Fixes i965 piglit:
fs-temp-array-mat[234]-col-row-wr
fs-temp-array-mat[234]-index-col-row-wr
fs-temp-array-mat[234]-index-col-wr
fs-temp-array-mat[234]-index-row-wr
vs-varying-array-mat[234]-index-col-wr
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
5f83dfe5b70337bcffe215f7c32d0b862b5e7a3b)
Ian Romanick [Mon, 18 Jul 2011 19:18:19 +0000 (12:18 -0700)]
glsl: Rework lowering of non-constant array indexing
The previous implementation could easily get tricked if the LHS of an
assignment included a non-constant index that was "inside" another
dereference. For example:
mat4 m[2];
m[0][i] = vec4(0.0);
Due to the way it tracked whether the array was being assigned, it
would think that the non-constant index was in an r-value. The new
code fixes that by tracking l-values and r-values differently. The
index is also replaced by cloning the IR and replacing the index
variable instead of the odd way it was done before.
v2: Apply some simplifications suggested by Eric Anholt. Making
assignment_generator::rvalue be ir_dereference instead of ir_rvalue
simplified the code a bit.
Fixes i965 piglit fs-temp-array-mat[234]-index-wr and
vs-varying-array-mat[234]-index-wr.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34691
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
1731ac308631138ca98d34e8b7070c6e3f981939)
To make bisects work, this also squashes in:
glsl: Correctly return progress from lower_variable_index_to_cond_assign
lower_variable_index_to_cond_assign runs until it can't make any more
progress. It then returns the result of the last pass which will
always be false. This caused the lowering loop in
_mesa_ir_link_shader to end before doing one last round of
lower_if_to_cond_assign. This caused several if-statements (resulting
from lower_variable_index_to_cond_assign) to be left in the IR.
In addition to this change, lower_variable_index_to_cond_assign should
take a flag indicating whether or not it should even generate
if-statements. This is easily controlled by
switch_generator::linear_sequence_max_length. This would generate
much better code on architectures without any flow contol.
Fixes i915 piglit regressions glsl-texcoord-array and
glsl-fs-vec4-indexing-temp-src.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
c1e591eed41b45c0fcf1dcac8b1b8aaeb6237a38)
Ian Romanick [Mon, 18 Jul 2011 17:07:24 +0000 (10:07 -0700)]
glsl: Split out part of variable_index_to_cond_assign_visitor::needs_lowering
Other code will soon need to know if an array needs lowering based
exclusively on the storage mode.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
d2296e784aa8fad81c4910dcbbf61e826ce9a06a)
Ian Romanick [Mon, 18 Jul 2011 16:51:34 +0000 (09:51 -0700)]
glsl: Move is_array_or_matrix outside visitor class
There's no reason for it to be there, and another class that may not
have access to the visitor will need it soon.
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit
8d5f3cef795428d7a95120416122a39c10cff11c)
Marek Olšák [Mon, 25 Jul 2011 23:05:51 +0000 (01:05 +0200)]
configure.ac: add DLOPEN_LIBS to xlib build
Otherwise xlib-based llvmpipe fails to link.
NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit
0aed27ee37860ba332df776425d89d97ca1168b2)
Benjamin Franzke [Wed, 27 Jul 2011 08:04:51 +0000 (10:04 +0200)]
wayland-drm: Add copyright notice to protocol
Fixes build since wayland
986703ac7365bc87a5501714adb9fc73157c62b7.
(cherry picked from commit
79dcfb266aa6ff14ff21c0b6dddef6060b450c32)
Tobias Droste [Thu, 14 Jul 2011 20:32:58 +0000 (22:32 +0200)]
egl/gallium: fix build without softpipe and llvmpipe
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
Reviewed-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit
d4d5e3a336f4c1f2208faad57a985f711b09d86d)
Benjamin Franzke [Wed, 27 Jul 2011 07:21:39 +0000 (09:21 +0200)]
Fix broken merge in cherry-pick from
42cdf407
Was cherry-picked to
337102684b78ce860337f8c7db446fbc2b227553.
Bryan Cain [Wed, 20 Jul 2011 22:35:22 +0000 (17:35 -0500)]
util: enable S3TC support when the force_s3tc_enable env var is set to "true"
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Bryan Cain [Mon, 25 Jul 2011 18:30:17 +0000 (13:30 -0500)]
st/mesa: respect force_s3tc_enable environment variable
NOTE: This is a candidate for the 7.10 and 7.11 branches.
Marek Olšák [Sat, 23 Jul 2011 13:57:51 +0000 (15:57 +0200)]
configure.ac: do not check for llvm-config if llvm is disabled
Benjamin Franzke [Mon, 25 Jul 2011 07:37:02 +0000 (09:37 +0200)]
configure: Move gbm before egl in SRC_DIRS
egl_dri2 built into libEGL depends on libgbm.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39515
(cherry picked from commit
42cdf4074e0f7d561b03a86255fa8f916f906bf6)
Marek Olšák [Thu, 21 Jul 2011 20:31:24 +0000 (22:31 +0200)]
configure.ac: check for libdrm_radeon only when building classic
(cherry picked from commit
50e32fefb1140a42101b1154d3df78db4906ee38)
Ian Romanick [Mon, 11 Jul 2011 17:46:01 +0000 (10:46 -0700)]
glsl: Reject shaders that contain static recursion
The GLSL 1.20 and later specs say:
"Recursion is not allowed, not even statically. Static recursion is
present if the static function call graph of the program contains
cycles."
Recursion is detected and rejected both a compile-time and at
link-time. The complie-time check happens to detect some cases that
may be removed by various optimization passes. The spec doesn't seem
to allow this, but other vendors (e.g., NVIDIA) appear to only check
at link-time after all optimizations.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33885
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
02c5ae1b3fef75d5c0a715313a69e6b95ebd5b95)
This also squashes in the following commit to make sure that bisects
in scons builds work:
glsl: Add ir_function_detect_recursion.cpp to SConscript.
(cherry picked from commit
76bccaff0c54aed10ffbc7c7dc744f1708921409)
Ian Romanick [Fri, 8 Jul 2011 17:34:38 +0000 (10:34 -0700)]
glsl: Make prototype_string publicly available
Also clarify the documentation for one of the parameters.
Reviewed-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
1ad3ba4ad954b86751bd5b6ad0a431920bff9958)
Stéphane Marchesin [Thu, 7 Jul 2011 02:17:15 +0000 (19:17 -0700)]
Revert "i915: Eliminate redundant CONSTANTS updates"
This reverts commit
87641cffd97f328e846604d314c21582f426a19a.
(cherry picked from commit
3c0c6248795806bb9e66bb89a7adc8fc0cf266d7)
Chia-I Wu [Wed, 20 Jul 2011 10:52:33 +0000 (18:52 +0800)]
u_vbuf_mgr: restore buffer offsets
u_vbuf_upload_buffers modifies the buffer offsets. If they are not
restored, and any of the vertex formats is not supported natively, the
next u_vbuf_mgr_draw_begin call will translate the vertex buffers with
incorrect buffer offsets.
(cherry picked from commit
afc160e1c8f87d0a76e41f1100d528d8ab82ecc4)
Signed-off-by: Marek Olšák <maraeo@gmail.com>
Marek Olšák [Mon, 11 Jul 2011 02:13:35 +0000 (04:13 +0200)]
r600g: more valgrind fixes
(cherry picked from commit
dc9d789d1b39f9702c179a1d60f76535352563df)
Marek Olšák [Mon, 11 Jul 2011 02:01:06 +0000 (04:01 +0200)]
r600g: zero memory of ioctl parameters
Fixes valgrind warning.
(cherry picked from commit
daf6604435594b2ec861a40eaf4c5a23c97c0714)
Marek Olšák [Thu, 21 Jul 2011 12:57:19 +0000 (14:57 +0200)]
configure.ac: Check for the respective libdrm_* when building gallium drivers
In a rare case of building gallium only, we need to
check if the required packages are available
libdrm_[intel|nouveau] - gallium[i915 i965|nouveau]
v2: r300g and r600g do not need libdrm_radeon
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
(cherry picked from commit
c2426bbf862850504f24e7d9765e64a75b873f3b)
Conflicts:
configure.ac
Marek Olšák [Tue, 19 Jul 2011 01:05:07 +0000 (03:05 +0200)]
mesa: GLES2 should return different error enums for invalid fbo queries
ES 2.0.25 page 127 says:
If the value of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is NONE, then
querying any other pname will generate INVALID_ENUM.
See also:
b9e9df78a03edb35472c2e231aef4747e09db792
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
000896c0bb99f356e52854608a29476d3ade387c)
Andrew Randrianasulu [Mon, 11 Jul 2011 20:05:13 +0000 (22:05 +0200)]
dri/nouveau: nv10: fix vertex format for GL_UNSIGNED_BYTE
Broken accidentally in
f4efc256fd90beaff86321e4c6ce00f9be55092d,
the switch to rnn headers.
NV10TCL_VTXFMT_TYPE_BYTE_RGBA became U8_UNORM but B8G8R8A8_UNORM
was used instead.
David Heidelberger [Mon, 11 Jul 2011 19:50:24 +0000 (21:50 +0200)]
nvfx: handle PIPE_CAP_SM3
Signed-off-by: David Heidelberger <d.okias@gmail.com>
Eric Anholt [Tue, 19 Jul 2011 22:06:15 +0000 (15:06 -0700)]
i965: Apply a homebrew workaround for GPU hang in OGLC api-texcoord.
The behavior of flushes in the hardware is a maze of twisty passages,
and strangely the VS constants appear to be loaded during a pipeline
flush instead of at the time of the packet emit according to the
simulator. On moving the STATE_BASE_ADDRESS packet to where it really
needed to live (in order for data loads by other packets to be
correct), we sometimes no longer got a flush between those packets
where we apparently needed it. This replicates the flushes implied by
a STATE_BASE_ADDRESS update, fixing the GPU hangs in OGLC and the
"engine" demo.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=36821
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39257
Tested-by: Keith Packard <keithp@keithp.com> (bzflag and etracer fixed)
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
3e5d36267d8c9536490c902f785137a7fa0637fc)
Eric Anholt [Tue, 19 Jul 2011 00:17:03 +0000 (17:17 -0700)]
i965: Enable the PIPE_CONTROL workaround workaround out of paranoia.
There's scary stuff going on in PIPE_CONTROL internals, and if the
BSpec says to do this to make PIPE_CONTROL work, I'll go ahead and do
it because we'll probably never be able to debug it after the fact.
v2: Use stall at scoreboard instead of depth stall, as noted by Ken.
(cherry picked from commit
407785d0e97abd0cc51a6e360089111973748e7c)
Eric Anholt [Mon, 18 Jul 2011 22:25:10 +0000 (15:25 -0700)]
i965: Avoid kernel BUG_ON if we happen to wait on the pipe_control w/a BO.
For this and occlusion queries, we're trying to avoid setting
I915_GEM_DOMAIN_RENDER for the write domain, because the data written
is definitely not going through the render cache, but we do need to
tell the kernel that the object has been written. However, with using
I915_GEM_DOMAIN_GTT, the kernel on retiring the batchbuffer sees that
the w/a BO has a write domain of GTT, and puts it on the flushing
list. If something tries to wait for that BO to finish rendering
(such as the AUB dumper reading the contents of BOs), we get into
wait_request (since obj->active) but with a 0 seqno (since the object
is on the flushing list, not actually on a ringbuffer), and BUG_ONs.
To avoid the kernel bug (which I'm hoping to delete soon anyway), just
use I915_GEM_DOMAIN_INSTRUCTION like occlusion queries do. This
doesn't result in more flushing, because we invalidate INSTRUCTION on
every batchbuffer now that we're state streaming, anyway.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Tested-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit
dc7422405f6f3c201993251e4665bb9ec1b59db0)
Eric Anholt [Wed, 13 Jul 2011 17:57:58 +0000 (10:57 -0700)]
i915: Simplify intel_wpos_* with a helper function.
(cherry picked from commit
cb5e0ba2aa97df28a9faeb7ca0d2f0cdfcf4e507)
Eric Anholt [Wed, 13 Jul 2011 17:56:37 +0000 (10:56 -0700)]
i915: Include gl_FragCoord.w data, not just xyz.
Fixes piglit fragcoord_w test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34323
(cherry picked from commit
fceda4342cadc22ce86877a19bf82b86eb022d79)
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)