Commit Graph

43246 Commits

Author SHA1 Message Date
Marek Olšák 20141d9efd r300/compiler: implement the CND opcode
No one uses it now, but I will need it for a lowering pass.
2011-04-05 06:36:56 +02:00
Marek Olšák c97234507a r300/compiler: set the MSB of ADDR for inline constants
The docs say so.
2011-04-05 06:36:56 +02:00
Brian Paul 5d92596c56 st/mesa: minor assorted clean-ups and fixes 2011-04-04 17:42:43 -06:00
Brian Paul ed9396782e st/mesa: use 'array' local var to simplify the code a bit 2011-04-04 17:42:43 -06:00
Brian Paul 6cab07685f st/mesa: fix zero-sized user vertex buffer bug
Commit 4c4ab5668c didn't properly
handle the stride==0 case.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35961
2011-04-04 17:42:43 -06:00
Ian Romanick e397b3a7c0 mesa: Add fall-back formats for unsupported snorm formats
This is always the way with real hardware and desktop OpenGL.  Some
hardware can't do some formats natively.  The alpha-only, luminance,
and intensity formats are usually the most problematic.  Some sized
formats can also be problematic.  This patch provides fall-back
formats for those that are not natively supported.

At some point it would be interesting to try providing
device-independent conversions using EXT_texture_swizzle.  The drivers
that support EXT_texture_swizzle could, for example, see
GL_LUMINANCE16_SNORM as MESA_FORMAT_SIGNED_R16 with a { r, r, r, 1 }
swizzle.  Care would need to be taken to prevent issues with using
those textures for FBO rendering.

This is the rest of the fix for glean's pixelFormats test on i965.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-04-04 15:18:37 -07:00
Ian Romanick ad3fbac00b i965: Add the missing supportable EXT_texture_snorm formats
This class of hardware can natively sample all of the snorm surface
formats that DX10 requires, but it can't do some of the legacy GL
formats.  In particular, all of the alpha, luminance, and intensity
formats are unsupported.

This partially fixes the breakage in glean's pixelFormats test since
GL_EXT_texture_snorm support was added to Mesa.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2011-04-04 14:32:01 -07:00
Bryan Cain 19d06b5c05 nv50: prevent NV_OP_SELECT from having flags_def defined 2011-04-04 23:08:54 +02:00
Brian Paul fdb04c0384 mesa: work around failed assertion for GL_RGBA16_SNORM accum buffer
We use this format to represent the accum buffer.  No snorm texture
sampling or rendering takes place.

Fixes failed assertion with swrast and any app using the accum buffer
(and glxinfo).
2011-04-04 14:37:28 -06:00
Brian Paul 32a11e5324 docs: update prerequisites, remove old demo info 2011-04-04 11:30:46 -06:00
Brian Paul 48f696c793 docs: update info about Mesa packaging/contents 2011-04-04 11:17:55 -06:00
Marek Olšák 0d96ae8fc7 r300/compiler: apply the texture swizzle to shadow pass and fail values too
Piglit tests:
- glsl-fs-shadow2d-01
- glsl-fs-shadow2d-02
- glsl-fs-shadow2d-03
- fs-shadow2d-red-01
- fs-shadow2d-red-02
- fs-shadow2d-red-03

NOTE: This is a candidate for the stable branches.
2011-04-04 19:13:01 +02:00
Marek Olšák 2679760834 r300/compiler: propagate SaturateMode down to the result of shadow comparison
NOTE: This is a candidate for the stable branches.
2011-04-04 19:13:01 +02:00
Alex Deucher a0fc40f0d5 r600g: add some additional ontario pci ids
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-04 11:15:18 -04:00
Alex Deucher b0da65bd0e r600c: add new ontario pci ids
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-04-04 11:13:44 -04:00
Marek Olšák 6caac3ecb8 r300g: do not wait for a busy BO if neither GPU nor CPU is changing it
Improves frame rate in apps with at least one user vertex buffer and
a hw index buffer.
2011-04-03 22:49:22 +02:00
Marek Olšák 9d881cbd5a r300g: remove unused RADEON_PB_USAGE_CACHE 2011-04-03 21:18:03 +02:00
Marek Olšák f814dd7a81 r300g: tell the GLSL compiler to lower the continue opcode
NOTE: This is a candidate for the stable branches.
2011-04-03 19:35:43 +02:00
Marek Olšák 652bf121f2 r300g: avoid mapping the same buffer twice
Shouldn't happen, but you never know.
2011-04-03 19:32:27 +02:00
Marek Olšák 437c748bf5 r300g: handle DISCARD_WHOLE_RESOURCE for buffers 2011-04-03 19:32:27 +02:00
Marek Olšák c35572352e r300g: remove the redundant reference counter in radeon_bo
We already have pb_buffer::reference::count.
2011-04-03 19:32:27 +02:00
Tom Stellard 381d32af74 Revert "r300/compiler: Remove obsolete compiler passes"
This reverts commit 9f013a8233.

These passes are still need for non-GLSL paths like g3dvl and ARB
programs.
2011-04-02 23:22:48 -07:00
Kenneth Graunke 5d7fefb9af i965/fs: Switch W and 1/W in Sandybridge interpolation setup.
Various documentation mentions that "W" is handed to the WM stage,
but further digging seems to indicate that they really mean 1/W.

The code here is still unclear, but changing this fixes piglit
test "fragcoord_w" on Sandybridge as well as a Khronos ES2 conformance
test.  I also tested 3DMarkMobile ES2.0's taiji and hoverjet demos, as
well as Nexuiz, just to be safe.

NOTE: This is a candidate for the 7.10 branch.
2011-04-02 18:58:16 -07:00
Kenneth Graunke a019dd0d6e i965: Fix null register use in Sandybridge implied move resolution.
Fixes regressions caused by commit 9a21bc6401, namely GPU hangs when
running gnome-shell or compiz (Mesa bugs #35820 and #35853).

I incorrectly refactored the case that dealt with ARF_NULL; even in that
case, the source register needs to be changed to the MRF.

NOTE: This is a candidate for the 7.10 branch (if 9a21bc6401 is
cherry-picked, take this one too).
2011-04-03 00:57:30 -07:00
Eric Anholt 904b8ba1bb i965: Fix the VS thread limits for GT1, and clarify the WM limits on both. 2011-04-01 14:12:32 -07:00
José Fonseca 6586a3b287 tests: Use elts in translate_test. 2011-04-01 20:18:22 +01:00
José Fonseca 3f68d4b058 scons: Add aliases for unit tests. 2011-04-01 20:18:22 +01:00
José Fonseca 17bbc1f042 translate: Respect translate_buffer::max_index. 2011-04-01 20:18:18 +01:00
José Fonseca 3733da31e8 draw: Prevent out-of-bounds vertex buffer access.
Based on some code and ideas from Keith Whitwell.
2011-04-01 20:18:18 +01:00
Marek Olšák 4a7f013f9d gallium: set PIPE_CAP_MIXED_COLORBUFFER_FORMATS in some drivers 2011-04-01 13:48:01 +02:00
Marek Olšák 25f2699767 gallium: add a CAP for mixed colorbuffer format support
Some GPUs can't do it (I think most of DX9 ones), so they should have
the option not to allow it.
2011-04-01 13:48:01 +02:00
Tom Stellard 9f013a8233 r300/compiler: Remove obsolete compiler passes
Branch emulation and loop unrolling are done in the GLSL frontend.
Transforming loops is no longer needed for fragment shaders, but it is still
necessary for vertex shaders.
2011-03-31 23:45:26 -07:00
Tom Stellard 18dcbd358f prog_optimize: Fix reallocating registers for shaders with loops
Registers that are used inside of loops need to be considered live
starting with the first instruction of the outermost loop.

https://bugs.freedesktop.org/show_bug.cgi?id=34370

NOTE: This is a candidate for the 7.9 and 7.10 branches.

Reviewed-by: Eric Anholt <eric@anholt.net>
2011-03-31 21:20:46 -07:00
Christoph Bumiller c3526585b7 nv50: fix for GPR allocation granularity being 16 bit 2011-03-31 16:51:32 +02:00
Christoph Bumiller 3f625689ac nv50: copy regalloc fixes from nvc0
Should fix gnome-shell's fade shader.

Unification of the shader backend which is supposed to remove the
code duplication is still WIP.
2011-03-31 16:24:59 +02:00
José Fonseca 3dedd39cdd draw: Revert code reorg in previous change.
Because

  fetch_count = max_index - min_index + 1

overflows for min_index = 0 and max_index = 0xffffffff.

Fixes fdo 35815.
2011-03-31 12:20:37 +01:00
Chris Wilson c40b7910ee intel: Fix regression in clear_with_blit from 7bae1c3d
Oops, the mask was being used in the loop to determine whether to use
include the stencil || depth values. This began to fail when mask was
cleared at the beginning of the loop. So reorder the tests and do the
work up-front along with determining the depth_stencil value to use.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35822
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-31 11:58:36 +01:00
Luca Barbieri 5f996e2b1d draw: implement vertex color clamping, and disable SSE and PPC paths
(some little changes by Marek Olšák)

Squashed commit of the following:

commit 737c0c6b7d591ac0fc969a7590e1691eeef0ce5e
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Fri Aug 27 02:13:57 2010 +0200

    draw: disable SSE and PPC paths (use LLVM instead)

    These paths don't support vertex clamping, and are anyway
    obsoleted by LLVM.

    If you want to re-enable them, add vertex clamping and test that it
    works with the ARB_color_buffer_float piglit tests.

commit fed3486a7ca0683b403913604a26ee49a3ef48c7
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:27:38 2010 +0200

    draw_llvm: respect vertex color clamp

commit ef0efe9f3d1d0f9b40ebab78940491d2154277a9
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:26:43 2010 +0200

    draw: respect vertex clamping in interpreter path
2011-03-31 03:35:31 +02:00
Jerome Glisse ebe304fa54 gallium: list use inline function to avoid macro shot coming
Macro can lead to hard to debug list bugs. For instance consider
the following :
LIST_ADD(item, list->prev)
3 instruction of the macro became :
(list->prev)->next->prev = item
which is equivalent to :
list->prev = item
Thus list prev field changes and next instruction in the macro
(list->prev)->next = item
became :
item->next = item
And you endup with list corruption, other case lead to similar
list corruption. Inline function are not affected by this short
coming

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2011-03-30 17:03:00 -04:00
José Fonseca dcad6fb670 draw: Forgot to remove one istart usage. 2011-03-30 16:09:34 +01:00
José Fonseca 713230ff39 draw: Fix bug when drawing ushort indices.
When the condition

 min_index == 0 && sizeof(ib[0]) == sizeof(draw_elts[0])

was true, we were wrongly ignoring istart and processing indices 0.

Reorder some statements to make the code easier to understand.
2011-03-30 16:05:24 +01:00
Chris Wilson 6584d0cd4f intel: Remove the unrelaxed relocation assertion
Now that we purposefully generate delta that point outside of the target
buffer, the assertion has outlived its usefulness.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-30 15:13:05 +01:00
Feng, Haitao 58f95f9d01 egl_dri2 x11: Fix a typo
Signed-off-by: Haitao Feng <haitao.feng@intel.com>
2011-03-30 08:29:09 -04:00
Chris Wilson 5eb9f68708 intel: Add some defense against buffer allocation failure for subimage blits
Once more! This time without the unwarranted conversion from
drm_intel_bo_alloc_tiled.

Signed-off-by: [a very embarrassed] Chris Wilson <chris@chris-wilson.co.uk>
2011-03-30 11:01:42 +01:00
Chris Wilson f5a9a0bc22 Revert "intel: Add some defense against buffer allocation failure for subimage blits"
This reverts commit de7678ef52.

The conversion from using drm_intel_bo_alloc_tiled to a plain
drm_intel_bo_alloc forgot that the tiled variant adjusts the
allocation height even for TILING_NONE.

Reported-by: Dave Airlie <airlied@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35786
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-03-30 11:01:42 +01:00
Michel Dänzer 167d35c303 gallium: Use explicit values in caps enums.
Simplifies mapping between numbers and identifiers for these.
2011-03-30 10:50:11 +02:00
Michel Dänzer 72e82418ef Use row stride instead of width when getting colour index texels.
Untested, noticed while working on the depth/stencil fix.
2011-03-30 10:48:37 +02:00
Michel Dänzer b082e04619 Use proper source row stride when getting depth/stencil texels. 2011-03-30 09:31:21 +02:00
Kenneth Graunke ee8d182426 intel: Add IS_GT2 macro for recognizing Sandybridge GT2 systems.
Also, refactor IS_GEN6 to use the IS_GT1 and IS_GT2 macros.
2011-03-29 17:08:53 -07:00
Christoph Bumiller 8f060df60d nv50,nvc0: implement colour clamping controls 2011-03-29 23:09:02 +02:00