summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* util: enable S3TC support when the force_s3tc_enable env var is set to "true"Bryan Cain2011-07-261-2/+9
| | | | NOTE: This is a candidate for the 7.10 and 7.11 branches.
* st/mesa: respect force_s3tc_enable environment variableBryan Cain2011-07-261-1/+10
| | | | NOTE: This is a candidate for the 7.10 and 7.11 branches.
* mesa: Make _mesa_get_compressed_formats match the texture compression specsIan Romanick2011-07-253-30/+93
| | | | | | | | | | | The implementation deviated slightly from the GL_EXT_texture_sRGB spec and from other implementations. A giant comment block was added to justify the somewhat odd behavior of this function. In addition, the interface had unnecessary cruft. The 'all' parameter was false at all callers, so it has been removed. Reviewed-by: Brian Paul <[email protected]>
* mesa: Return the correct internal fmt when a generic compressed fmt was usedIan Romanick2011-07-251-3/+17
| | | | | | | | | | If an application requests a generic compressed format for a texture and the driver does not pick a specific compressed format, return the generic base format (e.g., GL_RGBA) for the GL_TEXTURE_INTERNAL_FORMAT query. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=3165 Reviewed-by: Brian Paul <[email protected]>
* mesa: Add utility function to get base format from a GL compressed formatIan Romanick2011-07-252-0/+91
| | | | Reviewed-by: Brian Paul <[email protected]>
* i965/fs: Fix MRT drawing since the m0->m2 move for shader debug.Eric Anholt2011-07-251-1/+2
| | | | Reviewed-by: Ian Romanick <[email protected]>
* glsl: Correctly return progress from lower_variable_index_to_cond_assignIan Romanick2011-07-251-1/+3
| | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* configure.ac: do not check for llvm-config if llvm is disabledMarek Olšák2011-07-251-3/+2
| | | | NOTE: This is a candidate for the 7.11 branch.
* r300/compiler: simplify code in peephole_add_presub_addTobias Droste2011-07-251-17/+18
| | | | | Signed-off-by: Tobias Droste <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* winsys/radeon: fix typos in the driver interfaceMarek Olšák2011-07-251-2/+3
|
* winsys/radeon: manage constant buffers by the cache bufmgr tooMarek Olšák2011-07-251-1/+2
|
* winsys/radeon: remove usage parameter from buffer_createMarek Olšák2011-07-256-12/+5
|
* winsys/radeon: fix int->boolean conversion in radeon_bo_is_referenced_by_any_csMarek Olšák2011-07-251-1/+1
|
* winsys/radeon: little change in radeon_bo_is_referenced_by_csMarek Olšák2011-07-251-2/+3
|
* winsys/radeon: add R300 infix to winsys feature namesMarek Olšák2011-07-256-8/+7
|
* winsys/radeon: simplify how value queries workMarek Olšák2011-07-2512-171/+133
| | | | | This drops the get_value query and adds a function query_info, which returns all the values in one nice structure.
* i965: Fix many of the trivial WebGL demos that broke due to IB optimization.Eric Anholt2011-07-251-0/+1
| | | | | | | | | | | 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.
* i965: Use 3D clears on gen6+ to avoid inter-ring synchronization.Eric Anholt2011-07-251-2/+2
| | | | Improves firefox-talos-gfx around 5%.
* meta: Also save/restore clip planes for GLSL.Eric Anholt2011-07-251-1/+13
| | | | | | | | Fixes user-clip on 965 with 3D clears enabled. I created a separate flag because I wanted to avoid the overhead of the matrix operations in this path. Reviewed-by: Brian Paul <[email protected]>
* i965: Emit texture cache flushes on gen6 along with render cache flushes.Eric Anholt2011-07-251-0/+1
| | | | | | | | | | | | | | 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.
* i965: vs optimization fix: Check val.{negate,abs} in accumulator_contains()Paul Berry2011-07-251-0/+3
| | | | | | | | | | | | | | | | | | 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 <[email protected]>
* i965/gen7: Fix shadow sampling in the old brw_wm_emit backend.Kenneth Graunke2011-07-251-4/+11
| | | | | | | | | | | 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 <[email protected]>
* i965/fs: Clear result before visiting shadow comparitor and LOD info.Kenneth Graunke2011-07-251-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vdpau: enable mpeg1 hw decoding, using the exact same code path as mpeg2Emeric2011-07-251-12/+13
| | | | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39307 Signed-off-by: Christian König <[email protected]>
* gallium: change formats merged with pipe-video to type "other"Christian König2011-07-251-7/+7
| | | | Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39276
* configure: Move gbm before egl in SRC_DIRSBenjamin Franzke2011-07-251-35/+35
| | | | | | egl_dri2 built into libEGL depends on libgbm. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=39515
* g3dvl: remove unused vs output from create_ref_vert_shaderChristian König2011-07-251-4/+1
| | | | | The position of the quad vertex is calculated in calc_position, so we don't need the output here any more.
* r600g: use file_max instead of file_count to determine reg offsetChristian König2011-07-241-3/+3
| | | | | | Otherwise shaders with skipped inputs/outputs doesn't work correctly. Signed-off-by: Christian König <[email protected]>
* gallium/softpipe: Don't clobber dest color/alpha before masking.Younes Manton2011-07-231-89/+96
| | | | | | | | | The blend_quad function clobbers the actual render target color/alpha values while applying the destination blend factor, which results in restoring the wrong value during the masking stage for write-disabled channels. Reviewed-by: Brian Paul <[email protected]>
* glsl: Compare vector indices in blocksIan Romanick2011-07-231-23/+39
| | | | | | | | Just like the non-constant array index lowering pass, compare all N indices at once. For accesses to a vec4, this saves 3 comparison instructions on a vector architecture. Reviewed-by: Eric Anholt <[email protected]>
* glsl: Factor out code that generates block of index comparisonsIan Romanick2011-07-232-42/+73
| | | | Reviewed-by: Eric Anholt <[email protected]>
* glsl: Treat ir_dereference_array of non-var as a constant for loweringIan Romanick2011-07-231-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* i965: When emitting a src/dst read of an output, keep the swizzle and negIan Romanick2011-07-231-3/+16
| | | | | | Fixes i965 piglit vs-varying-array-mat[234]-row-rd. Reviewed-by: Eric Anholt <[email protected]>
* i965: When emitting a src/dst write of an output, keep the write maskIan Romanick2011-07-231-1/+5
| | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* prog_optimize: Set unused regs to PROGRAM_UNDEFINED after CMP->MOV conversionIan Romanick2011-07-231-0/+9
| | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* ir_to_mesa: Copy reladdr in src_reg(dst_reg) constructorIan Romanick2011-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* ir_to_mesa: Add each relative address to the previousIan Romanick2011-07-231-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* glsl: When lowering non-constant vector indexing, respect existing conditionsIan Romanick2011-07-231-5/+24
| | | | | | | 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 <[email protected]>
* glsl: When lowering non-constant array indexing, respect existing conditionsIan Romanick2011-07-231-3/+18
| | | | | | | | | | | | | | | 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 <[email protected]>
* glsl: Rework lowering of non-constant array indexingIan Romanick2011-07-231-19/+116
| | | | | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* glsl: Split out part of variable_index_to_cond_assign_visitor::needs_loweringIan Romanick2011-07-231-5/+10
| | | | | | | Other code will soon need to know if an array needs lowering based exclusively on the storage mode. Reviewed-by: Eric Anholt <[email protected]>
* glsl: Move is_array_or_matrix outside visitor classIan Romanick2011-07-231-5/+6
| | | | | | | 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 <[email protected]>
* gallivm: Add a note about log2 computation and denormalized numbers.José Fonseca2011-07-221-0/+6
|
* gallivm: Fix lp_build_exp2 order 4-5 polynomial coefficients and bump order.José Fonseca2011-07-221-12/+12
| | | | | | | Not sure how I computed these, but they were wrong (which explains why bumping the polynomial order before never improved precision). This allows to pass the EXP test cases of PSPrecision/VSPrecision DCTs.
* gallivm: Increase lp_build_rsqrt() precision.José Fonseca2011-07-221-1/+1
| | | | | | | Add an iteration step, which makes rqsqrt precision go from 12bits to 24, and fixes RSQ/NRM test case of PSPrecision/VSPrevision DCTs. There are no uses of this function outside shader translation.
* gallivm: Update minimax comments.José Fonseca2011-07-221-6/+17
|
* gallivm: Fix lp_build_exp/lp_build_log.José Fonseca2011-07-221-2/+2
| | | | | Never used so far -- we only used the base 2 variants -- which is why it went unnoticed so far.
* llvmpipe: Unit tests for arithmetic functions.José Fonseca2011-07-223-2/+298
| | | | | | Conflicts: src/gallium/drivers/llvmpipe/SConscript
* util: Store alpha value too.José Fonseca2011-07-221-1/+1
|
* glsl: Add standalone_scaffolding.cpp to SConscript.Vinson Lee2011-07-221-0/+1
|