Commit Graph

53337 Commits

Author SHA1 Message Date
Daniel Stone 4f310984a9 teximage: Remove unnecessary compressed format check
Ever since df4a88ac, the check for compressed formats has been
unnecessary.  And ever since cb72ec5f, the build has been broken with
FEATURE_ES.  Remove it, as it does nothing.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Marek Olšák <maraeo@gmail.com>
2012-10-09 14:32:03 +02:00
Andreas Boll b534c39ece docs: update FAQ
Reported-by: Fabio Pedretti <fabio.ped@libero.it>

v2: (Chad Versace <chad.versace@linux.intel.com>)
  - Rewrite FAQ - proper place for installing mesa.

v3: fix some typos

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-09 09:00:18 +02:00
Ben Skeggs 63c3a799ae nv50: point vertex runout at a valid address
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-09 09:56:36 +10:00
Ben Skeggs c47a01c29c nvc0: point vertex runout at a valid address
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-09 09:56:34 +10:00
Ben Skeggs d53bbabe61 nvc0: fix missing permanent bo reference on poly cache
Reviewed-by: Christoph Bumiller <e0425955@student.tuwien.ac.at>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2012-10-09 09:56:12 +10:00
Brian Paul 1aa8ad8b50 Revert "st/mesa: remove unused variables to fix compile warnings"
This reverts commit 810d2e167c.

The pscreen variable is used in an assertion.  Use "(void) pscreen;"
to silence the warning.
2012-10-08 17:32:54 -06:00
Brian Paul bad1b271a0 mesa: minor whitespace fixes in teximage.c 2012-10-08 17:30:21 -06:00
Marek Olšák 810d2e167c st/mesa: remove unused variables to fix compile warnings 2012-10-09 01:14:55 +02:00
Marek Olšák cb72ec5fc5 mesa: remove unused variables to fix compile warnings 2012-10-09 01:14:55 +02:00
Marek Olšák fd3219962d softpipe: initialize quadColor2 to fix compile warnings 2012-10-09 01:14:24 +02:00
Marek Olšák d0349c91c8 r600g: remove unused variables to fix compile warnings 2012-10-09 01:11:56 +02:00
Marek Olšák d284613422 llvmpipe: remove unused variables to fix compile warnings 2012-10-09 01:10:58 +02:00
Stéphane Marchesin 437a2560b1 i915g: Don't clobber I915_NEW_FS on new framebuffer.
This snuck in with a previous commit.
2012-10-08 12:30:46 -07:00
Eric Anholt 6a514494fa i965/fs: Improve performance of copy/constant propagation.
Use a simple chaining hash table for the ACP.  This is not really very good,
because we still do a full walk of the tree per destination write, but it
still reduces fp-long-alu runtime from 5.3 to 3.9s.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:50:38 -07:00
Eric Anholt fb5bf03a20 i965/fs: Move constant propagation to the same codebase as copy prop.
This means that we don't get constant prop across into the first block after a
BRW_OPCODE_IF or a BRW_OPCODE_DO, but we have hope for properly doing it
across control flow at some point.  More importantly, with the next commit it
will help avoid O(n^2) with instruction count runtime for shaders that have
many constant moves.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:50:38 -07:00
Eric Anholt 098acf6c84 i965: Remove the old ARB_fragment_program backend.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:50:38 -07:00
Eric Anholt 97615b2d8c i965: Replace brw_wm_* with dumping code into the fs_visitor.
This makes a giant pile of code newly dead.  It also fixes TXB on newer
chipsets, which has been totally broken (I now have a piglit test for that).
It passes the same set of Ian's ARB_fragment_program tests.  It also improves
high-settings ETQW performance by 3.2 +/- 1.9% (n=3), thanks to better
optimization and having 8-wide along with 16-wide shaders.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24355
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:50:27 -07:00
Eric Anholt 014aaa97d3 i965: Reduce maximum GL_ARB_fragment_program instruction count to 1024.
I don't know of any programs that would need more than this.  The larger
programs I've seen have neared 100 instructions.  This prevent excessive
runtimes of automatic tests that attempt to test up to the exposed maximums
(like fp-long-alu).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
Eric Anholt 9cfc00a84c i965/fs: Add a couple more algebraic cases that help some ARB_fp patterns.
ARB_fp doesn't go through the GLSL optimizer, and these were things you see
frequently thanks to conditionals being lowered to SLT/SGE and MUL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
Eric Anholt d81d7a4b65 i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.
This will be reused from the ARB_fp compiler.  I touched up the pre-gen6 path
to not overwrite dst in the first instruction, which prevents the need for
aliasing checks (we'll need that in the ARB_fp compiler, but it actually
hasn't been needed in this codebase since the revert of the nasty old
MOV-avoidance code).  I also made the conditional_mod between gen6 and
pre-gen6 consistent, which shouldn't matter except for denorm/(+/-)0
comparisons where the choice between left and right hand side of the
comparison changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
Eric Anholt 5c26874546 i965/fs: Refactor rectangle/GL_CLAMP texture coordinate adjustment.
We'll want to reuse this for ARB_fp handling.

v2: Fold the remaining bit of emit_texcoord back into visit(ir_texture).

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
Eric Anholt e7149d390c i965/fs: Pass fragment depth to the fb write as a fs_reg, not an ir_variable.
This will be used for the ARB_fp change to use this backend.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
Eric Anholt 6589c0bd56 mesa: Note that OPCODE_RFL is not part of ARB_fp (it's NV_fp only).
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-10-08 08:38:49 -07:00
José Fonseca 88e417d761 st/wgl: Don't cache HDC anywhere.
Applications may destroy HDC at any time. So always get a HDC as needed.

Fixes lack of presents with Solidworks eDrawings when screen resolution is
changed.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-08 15:42:50 +01:00
Ian Romanick 86de501f14 meta: Make shader template literal strings be parameters to asprintf
This enables the C compiler to generate warnings if the formats and the
arguments don't match.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:35:50 -07:00
Ian Romanick 751737f497 meta: Always enable GL_EXT_texture_array in mipmap shader
'#extension foo: enable' is harmless.  The functionality is only
actually enabled if the extension is supported.  The shader won't use
the functionality if it's not supported, so we're fine.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:35:47 -07:00
Ian Romanick 0e973b7498 meta: Since mipmap output type is always vec4, don't sprintf it
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:35:45 -07:00
Ian Romanick 0242381f06 meta: Don't use GLSL 1.30 shader on OpenGL ES 2
Fixes GLES2 CoverageGL conformance test.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:35:42 -07:00
Ian Romanick 3308c079bd meta: Rearrange shader creation in setup_glsl_generate_mipmap
The diff looks weird, but this moves the code from the first 'if
(ctx->Const.GLSLVersion < 130)' block down into the second block.  It
also moves some variable decalarations closer to their use.

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:35:39 -07:00
Ian Romanick ab097dde0c meta: Remove unsafe global mem_ctx pointer
NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2012-10-07 20:34:17 -07:00
Stéphane Marchesin 6ef37f71b0 i915g: Call draw_set_mapped_vertex_buffer from draw_vbo
This regressed with the draw rework. Fixes glest and vdrift crash.
2012-10-06 13:15:04 -07:00
Marek Olšák 9dfca930d7 r600g: fix possible issue with stencil mipmap rendering
Somehow I only hit this issue with my latest libdrm changes.
This won't be needed with DB texturing.

NOTE: This is a candidate for the 9.0 branch.
2012-10-06 05:31:01 +02:00
Marek Olšák 6fa22b840e r600g: ensure PERFECT_ZPASS+NOOP_CULL_DISABLE are 0 for blits+decompression
When an occlusion query was active, the derived DB state wasn't changed
for u_blitter even though all the occlusion queries were suspended.

It's fixed by moving the state update into the emit functions, which are
called whenever queries are stopped or suspended.
2012-10-06 04:31:16 +02:00
Marek Olšák 6db53ca490 r600g: don't modify pipe_resource in resource_copy_region, fixing race condition
pipe_resource can be shared between contexts, we shouldn't modify its
description. Instead, let's use the resource "views" (sampler views and
surfaces), where we can freely change almost any property of a resource.
2012-10-06 04:31:16 +02:00
Marek Olšák d063c7b142 r600g: fix streamout on RS780 and RS880
The latest kernel from git is required. Transform feedback (along with GL3.0)
is turned off on older kernels.
2012-10-06 03:49:29 +02:00
Marek Olšák 588263e7a7 gallium: allow debug helpers in the release build
No idea why this is #ifdef'd. Trace and Noop are definitely useful no matter
how Mesa is built.

Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-06 03:34:40 +02:00
Brian Paul 733dba2a08 mesa: remove the driverCtx parameter to _mesa_create/initialize_context()
No longer used.
2012-10-05 17:13:03 -06:00
Brian Paul 917d273928 mesa: remove unused gl_context::DriverCtx field 2012-10-05 17:13:03 -06:00
Brian Paul 4c9042d21d radeon/r200: remove use of gl_context::DriverCtx field 2012-10-05 17:13:03 -06:00
Brian Paul 5a63634a13 radeon/r200: make radeon_context subclass of gl_context
radeon_context now contains a gl_context, rather than a pointer to one.
This will allow some minor core Mesa clean-up.
2012-10-05 17:13:03 -06:00
Kenneth Graunke 7fa0f10cd8 mesa: Flag _NEW_VARYING_VP_INPUTS when TexEnv programs are active.
The idea here is to not flag _NEW_VARYING_VP_INPUTS when shaders (either
GLSL or ARB vp/fp) are in use.  If either TNL or TexEnv programs are
active, at least one stage is using fixed function.

On Pineview, fixes 20 Piglit, 60 oglconforms, and 7 ES 1.1 conformance
tests, as well as missing textures in Xonotic.  These were all
regressions since commit fb4a34e60e.

NOTE: This is a candidate for the 9.0 branch.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49127
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54807
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-05 13:19:53 -07:00
Stéphane Marchesin 74b6ea49df i915g: Get rid of the fixup state functions.
Now that the saved_* state is gone, we don't need those any longer.
2012-10-05 12:45:02 -07:00
Stéphane Marchesin dca9e3c477 i915g: Remove the i915_context->saved_* stuff.
When using u_blitter, the state was being saved from saved_*, but we
don't use that. So after u_blitter resumed we got some corrupted
state in.

So let's just remove the saved_* stuff. I thought it was weird but
harmless, it's actually broken.
2012-10-05 12:45:01 -07:00
Stéphane Marchesin 98600c5ff6 i915g: Don't update I915_HW_PROGRAM in update_framebuffer
It's already going to be updated in update_dst_buf_vars.
2012-10-05 12:45:00 -07:00
Stéphane Marchesin 762ac0a218 Revert "i915g: Don't bind 0-length programs"
This reverts commit 8c28a9bd73.
2012-10-05 12:44:58 -07:00
Vinson Lee df0de93206 glapi: Do not use backtrace on Cygwin.
execinfo.h is not available on Cygwin.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
2012-10-04 22:28:15 -07:00
Paul Berry 8f0b81bf7d mesa: don't enable glVertexPointer() when using API_OPENGLES2.
This function is only present in GLES1 and in the OpenGL compatibility
profile.

Fixes the following "make check" failure:

    [----------] 1 test from DispatchSanity_test
    [ RUN      ] DispatchSanity_test.GLES2
    Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
    compression/decompression unavailable
    dispatch_sanity.cpp:122: Failure
    Value of: table[i]
       Actual: 0x4de54e
    Expected: (_glapi_proc) _mesa_generic_nop
    Which is: 0x41af72
    i = 321
    [  FAILED  ] DispatchSanity_test.GLES2 (4 ms)
    [----------] 1 test from DispatchSanity_test (4 ms total)

NOTE: This is a candidate for stable release branches.

Reviewed-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Tested-by: Oliver McFadden <oliver.mcfadden@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2012-10-04 12:46:42 -07:00
Stéphane Marchesin 8c28a9bd73 i915g: Don't bind 0-length programs
Since we started doing fixups for different render target formats,
this has been an issue. Instead just don't do anything, when the
program gets emitted later it'll get the correct fixup.

Fixes a bunch of piglit tests.
2012-10-04 12:39:06 -07:00
Brian Paul 91d8409649 mesa: don't call TexImage driver hooks for zero-sized images
This simply avoids some failed assertions but there's no reason to
call the driver hooks for storing a tex image if its size is zero.

Note: This is a candidate for the stable branches.
2012-10-04 07:59:11 -06:00
Rob Bradford 185d6df3c1 intel: Fix intel_texsubimage_tiled_memcpy to skip GL_EXT_unpack_subimage case
413c49141 added an optimisation to improve the performance of teximage
under a limited set of circumstances. If GL_EXT_unpack_subimage has been
used then we we must also skip this optimisation since the optimised
codepath does not take the packing values into consideration.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-10-03 16:44:22 -07:00