- Jul 26, 2011
-
-
Ian Romanick authored
-
Ian Romanick authored
-
Emma Anholt authored
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 3daa2d97)
-
Emma Anholt authored
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 818db384)
-
Emma Anholt authored
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 185868c9)
-
Paul Berry authored
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 d92463d5)
-
Kenneth Graunke authored
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 572f6318)
-
Kenneth Graunke authored
Commit 53c89c67 ("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 156cef0f)
-
Ian Romanick authored
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 156f8533)
-
Ian Romanick authored
Fixes i965 piglit vs-varying-array-mat[234]-row-rd. Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 1d3f09f1)
-
Ian Romanick authored
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 337e2dfa)
-
Ian Romanick authored
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 fbeb68e8)
-
Ian Romanick authored
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 f7cd9a85)
-
Ian Romanick authored
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 d6e1a8f7)
-
Ian Romanick authored
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 601428d2)
-
Ian Romanick authored
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 5f83dfe5)
-
Ian Romanick authored
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 1731ac30) 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 c1e591ee)
-
Ian Romanick authored
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 d2296e78)
-
Ian Romanick authored
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 8d5f3cef)
-
- Jul 25, 2011
-
-
Marek Olšák authored
-
Benjamin Franzke authored
egl_dri2 built into libEGL depends on libgbm. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39515 (cherry picked from commit 42cdf407)
-
- Jul 23, 2011
-
-
Marek Olšák authored
(cherry picked from commit 50e32fef)
-
Ian Romanick authored
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 02c5ae1b) 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 76bccaff)
-
Ian Romanick authored
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 1ad3ba4a)
-
Stéphane Marchesin authored
This reverts commit 87641cff. (cherry picked from commit 3c0c6248)
-
- Jul 21, 2011
-
-
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 afc160e1) Signed-off-by: Marek Olšák <maraeo@gmail.com>
-
Marek Olšák authored
(cherry picked from commit dc9d789d)
-
Marek Olšák authored
Fixes valgrind warning. (cherry picked from commit daf66044)
-
Marek Olšák authored
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 c2426bbf) Conflicts: configure.ac
-
Marek Olšák authored
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: b9e9df78 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 000896c0)
-
Broken accidentally in f4efc256, the switch to rnn headers. NV10TCL_VTXFMT_TYPE_BYTE_RGBA became U8_UNORM but B8G8R8A8_UNORM was used instead.
-
David Heidelberg authored
Signed-off-by: David Heidelberger <d.okias@gmail.com>
-
- Jul 20, 2011
-
-
Emma Anholt authored
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 3e5d3626)
-
Emma Anholt authored
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 407785d0)
-
Emma Anholt authored
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 dc742240)
-
Emma Anholt authored
(cherry picked from commit cb5e0ba2)
-
Emma Anholt authored
Fixes piglit fragcoord_w test. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34323 (cherry picked from commit fceda434)
-
Emma Anholt authored
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 debf751a)
-
Emma Anholt authored
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 79fee3a7)
-
Emma Anholt authored
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 fc4fba52)
-