Kenneth Graunke [Tue, 5 Apr 2011 19:16:57 +0000 (12:16 -0700)]
ir_to_mesa: Rename ir_to_mesa_emit_*_opX methods to emit_*.
There's really no need for a prefix on member functions, and overloading
takes care of the _op1/_op2 distinction quite nicely. Eric already made
a similar change in the i965 FS backend.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 5 Apr 2011 19:01:59 +0000 (12:01 -0700)]
ir_to_mesa: Use constructors to convert between src_reg and dst_reg.
Rather than ir_to_mesa_dst_reg_from_src and ir_to_mesa_src_reg_from_dst.
The new constructors are marked 'explicit' so that the compiler can
catch cases where source and destination registers were accidentally
interchanged.
This also necessitated using constructors to initialize the undef and
address registers, as well as adding a default constructor.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 5 Apr 2011 18:43:21 +0000 (11:43 -0700)]
ir_to_mesa: Remove the "ir_to_mesa_" prefix on src_reg/dst_reg types.
Both classes are completely private to ir_to_mesa.cpp, so there won't be
any name conflicts with other parts of Mesa. The prefix simply makes it
harder to read.
Also, use a class rather than typedef structs.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Kenneth Graunke [Tue, 5 Apr 2011 18:30:36 +0000 (11:30 -0700)]
ir_to_mesa: Rename src_reg and dst_reg variables to src and dst.
This is in preparation from removing the "ir_to_mesa_" prefix on the
src_reg and dst_reg types, which would cause a naming conflict.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Brian Paul [Tue, 5 Apr 2011 20:07:41 +0000 (14:07 -0600)]
scons: generate empty git_sha1.h file for now
My feeble attempt to invoke the extract_git_sha1 script from
SConscript didn't work. Hopefully this will do for now.
Ian Romanick [Thu, 31 Mar 2011 18:42:01 +0000 (11:42 -0700)]
mesa: Include GIT SHA1 in GL version string
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Ian Romanick [Tue, 1 Mar 2011 22:10:49 +0000 (14:10 -0800)]
dri: Remove driver date from renderer string
Reviewed-by: Corbin Simpson <MostAwesomeDude@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Ian Romanick [Mon, 4 Apr 2011 20:35:26 +0000 (13:35 -0700)]
ir_to_mesa: Handle shadow compare w/projection and LOD bias correctly
The code would previously handle the projection, then swizzle the
shadow comparitor into place. However, when the projection is done
"by hand," as in the TXB case, the unprojected shadow comparitor would
over-write the projected shadow comparitor.
Shadow comparison with projection and LOD is an extremely rare case in
real application code, so it shouldn't matter that we don't handle
that case with the greatest efficiency.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=32395
Marek Olšák [Tue, 5 Apr 2011 15:57:02 +0000 (17:57 +0200)]
r300g: postpone fragment shader state validation until draw_vbo
Tom Stellard [Tue, 5 Apr 2011 07:04:45 +0000 (00:04 -0700)]
r300/compiler: Fix vertex shader MAD instructions with constant swizzles
NOTE: This is a candidate for the 7.9 and 7.10 branches.
Fabian Bieler [Fri, 25 Mar 2011 10:06:01 +0000 (11:06 +0100)]
st/mesa: Apply LOD from texture object
Signed-off-by: Brian Paul <brianp@vmware.com>
Fabian Bieler [Fri, 25 Mar 2011 10:04:41 +0000 (11:04 +0100)]
st/mesa: Apply LOD bias from correct texture unit
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Tue, 5 Apr 2011 13:53:05 +0000 (07:53 -0600)]
mesa: fix alpha value for texstore_rgbx8888
Silences constant overflow compiler warning.
Fabian Bieler [Tue, 5 Apr 2011 13:51:01 +0000 (07:51 -0600)]
mesa: Guard against null pointer deref in fbo validation
This matches the behaviour below when numSamples is compared.
At least with the gallium state tracker this can actually occur if st_render_texture fails.
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Tue, 5 Apr 2011 13:51:01 +0000 (07:51 -0600)]
mesa: added _mesa_get_attachment_teximage() helpers
Brian Paul [Tue, 5 Apr 2011 13:51:01 +0000 (07:51 -0600)]
mesa: 80-column wrapping
Dave Airlie [Tue, 5 Apr 2011 06:54:08 +0000 (16:54 +1000)]
r300c: fix build since last r300g commit
Marek Olšák [Tue, 5 Apr 2011 04:21:26 +0000 (06:21 +0200)]
r300g: fix RG/LATC1_SNORM by doing UNORM->SNORM conversion in the shader
Marek Olšák [Tue, 5 Apr 2011 04:18:18 +0000 (06:18 +0200)]
r300/compiler: implement the CND opcode
No one uses it now, but I will need it for a lowering pass.
Marek Olšák [Tue, 5 Apr 2011 00:44:03 +0000 (02:44 +0200)]
r300/compiler: set the MSB of ADDR for inline constants
The docs say so.
Brian Paul [Mon, 4 Apr 2011 23:42:25 +0000 (17:42 -0600)]
st/mesa: minor assorted clean-ups and fixes
Brian Paul [Mon, 4 Apr 2011 23:36:40 +0000 (17:36 -0600)]
st/mesa: use 'array' local var to simplify the code a bit
Brian Paul [Mon, 4 Apr 2011 23:24:09 +0000 (17:24 -0600)]
st/mesa: fix zero-sized user vertex buffer bug
Commit
4c4ab5668cd6df573db7b065f0493fb80ac70ab8 didn't properly
handle the stride==0 case.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35961
Ian Romanick [Sun, 3 Apr 2011 01:56:33 +0000 (18:56 -0700)]
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>
Ian Romanick [Sun, 3 Apr 2011 01:49:13 +0000 (18:49 -0700)]
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>
Bryan Cain [Mon, 4 Apr 2011 21:07:16 +0000 (23:07 +0200)]
nv50: prevent NV_OP_SELECT from having flags_def defined
Brian Paul [Mon, 4 Apr 2011 20:37:16 +0000 (14:37 -0600)]
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).
Brian Paul [Mon, 4 Apr 2011 17:30:46 +0000 (11:30 -0600)]
docs: update prerequisites, remove old demo info
Brian Paul [Mon, 4 Apr 2011 17:16:51 +0000 (11:16 -0600)]
docs: update info about Mesa packaging/contents
Marek Olšák [Mon, 4 Apr 2011 16:55:08 +0000 (18:55 +0200)]
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.
Marek Olšák [Mon, 4 Apr 2011 16:35:16 +0000 (18:35 +0200)]
r300/compiler: propagate SaturateMode down to the result of shadow comparison
NOTE: This is a candidate for the stable branches.
Alex Deucher [Mon, 4 Apr 2011 15:15:18 +0000 (11:15 -0400)]
r600g: add some additional ontario pci ids
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Alex Deucher [Mon, 4 Apr 2011 15:13:44 +0000 (11:13 -0400)]
r600c: add new ontario pci ids
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Marek Olšák [Sun, 3 Apr 2011 19:25:40 +0000 (21:25 +0200)]
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.
Marek Olšák [Sun, 3 Apr 2011 19:18:03 +0000 (21:18 +0200)]
r300g: remove unused RADEON_PB_USAGE_CACHE
Marek Olšák [Sun, 3 Apr 2011 17:26:54 +0000 (19:26 +0200)]
r300g: tell the GLSL compiler to lower the continue opcode
NOTE: This is a candidate for the stable branches.
Marek Olšák [Sun, 3 Apr 2011 17:17:19 +0000 (19:17 +0200)]
r300g: avoid mapping the same buffer twice
Shouldn't happen, but you never know.
Marek Olšák [Sun, 3 Apr 2011 16:14:49 +0000 (18:14 +0200)]
r300g: handle DISCARD_WHOLE_RESOURCE for buffers
Marek Olšák [Sun, 3 Apr 2011 15:32:47 +0000 (17:32 +0200)]
r300g: remove the redundant reference counter in radeon_bo
We already have pb_buffer::reference::count.
Tom Stellard [Sun, 3 Apr 2011 06:14:12 +0000 (23:14 -0700)]
Revert "r300/compiler: Remove obsolete compiler passes"
This reverts commit
9f013a8233197d4a0482661cb37cfeac1a61b804.
These passes are still need for non-GLSL paths like g3dvl and ARB
programs.
Kenneth Graunke [Sun, 3 Apr 2011 08:39:28 +0000 (01:39 -0700)]
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.
Kenneth Graunke [Sun, 3 Apr 2011 07:57:30 +0000 (00:57 -0700)]
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).
Eric Anholt [Tue, 29 Mar 2011 20:22:13 +0000 (13:22 -0700)]
i965: Fix the VS thread limits for GT1, and clarify the WM limits on both.
José Fonseca [Fri, 1 Apr 2011 19:13:40 +0000 (20:13 +0100)]
tests: Use elts in translate_test.
José Fonseca [Fri, 1 Apr 2011 19:12:10 +0000 (20:12 +0100)]
scons: Add aliases for unit tests.
José Fonseca [Fri, 1 Apr 2011 18:19:42 +0000 (19:19 +0100)]
translate: Respect translate_buffer::max_index.
José Fonseca [Thu, 31 Mar 2011 13:40:25 +0000 (14:40 +0100)]
draw: Prevent out-of-bounds vertex buffer access.
Based on some code and ideas from Keith Whitwell.
Marek Olšák [Tue, 29 Mar 2011 16:18:05 +0000 (18:18 +0200)]
gallium: set PIPE_CAP_MIXED_COLORBUFFER_FORMATS in some drivers
Marek Olšák [Mon, 28 Mar 2011 00:28:48 +0000 (02:28 +0200)]
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.
Tom Stellard [Fri, 1 Apr 2011 06:45:26 +0000 (23:45 -0700)]
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.
Tom Stellard [Sun, 27 Mar 2011 08:17:43 +0000 (01:17 -0700)]
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>
Christoph Bumiller [Thu, 31 Mar 2011 14:36:31 +0000 (16:36 +0200)]
nv50: fix for GPR allocation granularity being 16 bit
Christoph Bumiller [Thu, 31 Mar 2011 13:49:33 +0000 (15:49 +0200)]
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.
José Fonseca [Thu, 31 Mar 2011 11:20:10 +0000 (12:20 +0100)]
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.
Chris Wilson [Thu, 31 Mar 2011 10:41:46 +0000 (11:41 +0100)]
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>
Luca Barbieri [Tue, 15 Feb 2011 23:25:54 +0000 (00:25 +0100)]
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
Jerome Glisse [Mon, 28 Mar 2011 21:45:31 +0000 (17:45 -0400)]
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>
José Fonseca [Wed, 30 Mar 2011 15:08:42 +0000 (16:08 +0100)]
draw: Forgot to remove one istart usage.
José Fonseca [Tue, 29 Mar 2011 14:35:30 +0000 (15:35 +0100)]
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.
Chris Wilson [Wed, 30 Mar 2011 14:10:50 +0000 (15:10 +0100)]
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>
Feng, Haitao [Tue, 29 Mar 2011 05:41:35 +0000 (13:41 +0800)]
egl_dri2 x11: Fix a typo
Signed-off-by: Haitao Feng <haitao.feng@intel.com>
Chris Wilson [Fri, 4 Mar 2011 15:04:36 +0000 (15:04 +0000)]
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>
Chris Wilson [Wed, 30 Mar 2011 09:54:31 +0000 (10:54 +0100)]
Revert "intel: Add some defense against buffer allocation failure for subimage blits"
This reverts commit
de7678ef521f4fb34459e407a66ab8bf8be733e1.
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>
Michel Dänzer [Wed, 30 Mar 2011 08:20:00 +0000 (10:20 +0200)]
gallium: Use explicit values in caps enums.
Simplifies mapping between numbers and identifiers for these.
Michel Dänzer [Wed, 30 Mar 2011 08:48:37 +0000 (10:48 +0200)]
Use row stride instead of width when getting colour index texels.
Untested, noticed while working on the depth/stencil fix.
Michel Dänzer [Wed, 30 Mar 2011 07:02:21 +0000 (09:02 +0200)]
Use proper source row stride when getting depth/stencil texels.
Kenneth Graunke [Wed, 30 Mar 2011 00:03:22 +0000 (17:03 -0700)]
intel: Add IS_GT2 macro for recognizing Sandybridge GT2 systems.
Also, refactor IS_GEN6 to use the IS_GT1 and IS_GT2 macros.
Christoph Bumiller [Tue, 29 Mar 2011 21:09:02 +0000 (23:09 +0200)]
nv50,nvc0: implement colour clamping controls
Fredrik Höglund [Tue, 29 Mar 2011 17:52:03 +0000 (19:52 +0200)]
r600g: implement texture barrier
Fredrik Höglund [Tue, 29 Mar 2011 17:43:59 +0000 (19:43 +0200)]
r600g: implement the pipe_screen fence functions
v2: Allocate the fences from a single shared buffer object.
v3: Allocate the r600_fence structs in blocks of 16.
Spin a few times before calling sched_yield in r600_fence_finish().
Ian Romanick [Fri, 25 Mar 2011 01:31:05 +0000 (18:31 -0700)]
mesa: Fix ugly indentation left from previous commit
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Ian Romanick [Tue, 25 Jan 2011 18:41:20 +0000 (10:41 -0800)]
glsl: Calcluate Mesa state slots in front-end instead of back-end
This should be the last bit of infrastructure changes before
generating GLSL IR for assembly shaders.
This commit leaves some odd code formatting in ir_to_mesa and brw_fs.
This was done to minimize whitespace changes / reindentation in some
loops. The following commit will restore formatting sanity.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Ian Romanick [Tue, 25 Jan 2011 00:55:50 +0000 (16:55 -0800)]
glsl: Move _mesa_builtin_uniform_desc from uniforms.c to ir_variable.cpp
This array is going to be used in the main compiler soon. Leaving
them uniforms.c caused problems for building the stand-alone compiler.
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Marek Olšák [Tue, 29 Mar 2011 14:35:13 +0000 (16:35 +0200)]
r300g: add support for all render targets with one and two channels
The hardware should be set according to this table:
FORMAT -> R300 COLORFORMAT
-------------------------
X16 -> UV88
X16Y16 -> ARGB8888
X32 -> ARGB8888
X32Y32 -> ARGB16161616
US_OUT_FMT must contain the real format.
I wasn't able to make B3G3R2 and L4A4 work, but those aren't important.
Marek Olšák [Tue, 29 Mar 2011 16:01:44 +0000 (18:01 +0200)]
intel: fix build
broken with
e5c6a92a12b5cd7db205d72039f58d302b0be9d5
(mesa: implement clamping controls (ARB_color_buffer_float))
Chris Wilson [Tue, 29 Mar 2011 14:40:21 +0000 (15:40 +0100)]
intel: Protect intel_clear_with_blit from failed buffer allocations
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34419
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Tue, 29 Mar 2011 14:39:01 +0000 (15:39 +0100)]
i965: Avoid name clash of loop counter and member
src/mesa/drivers/dri/i965/brw_fs.cpp:565 warning: name lookup of ‘c’ changed
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Chris Wilson [Thu, 10 Mar 2011 18:01:32 +0000 (18:01 +0000)]
i915: Detect allocation failure of batch buffer
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Marek Olšák [Tue, 29 Mar 2011 11:03:26 +0000 (13:03 +0200)]
docs: update GL3 status
Marek Olšák [Mon, 14 Mar 2011 15:37:15 +0000 (16:37 +0100)]
r300g: finish up signed normalized textures and render targets
Marek Olšák [Tue, 15 Feb 2011 23:50:25 +0000 (00:50 +0100)]
r300g: enable clamping controls
Marek Olšák [Sat, 26 Mar 2011 12:19:23 +0000 (13:19 +0100)]
gallium: remove PIPE_CAP_VERTEX_COLOR_CLAMP_CONTROL
The vertex color clamp control is a property of an API,
a lot like gl_rasterization_rules.
The state should be set according to the API being implemented, for example:
OpenGL Compatibility: enabled by default
OpenGL Core: disabled by default
D3D11: always disabled
This patch also changes the way ARB_color_buffer_float is advertised.
If no SNORM or FLOAT render target is supported, fragment color clamping
is not required.
Marek Olšák [Sat, 26 Mar 2011 12:06:22 +0000 (13:06 +0100)]
mesa: clamp texture border color if ARB_texture_float is unsupported
ARB_texture_float disables clamping of the texture border color,
ARB_color_buffer_float only modifies clamping of the glGet query.
Marek Olšák [Tue, 15 Mar 2011 14:00:02 +0000 (15:00 +0100)]
st/mesa: choose an appropriate texture format for DrawPixels
Marek Olšák [Mon, 14 Mar 2011 09:04:36 +0000 (10:04 +0100)]
gallium: add EXT_texture_snorm support
Marek Olšák [Sun, 13 Mar 2011 13:48:09 +0000 (14:48 +0100)]
mesa: implement texstore and texfetch hooks for signed normalized formats
The snorm texstore functions were all broken.
swrast support done except for mipmap generation, but I leave it disabled.
Marek Olšák [Fri, 18 Mar 2011 12:44:51 +0000 (13:44 +0100)]
mesa: initial EXT_texture_snorm support
The component ordering of some formats has been been reversed to match
Gallium types.
Luca Barbieri [Tue, 15 Feb 2011 23:14:49 +0000 (00:14 +0100)]
gallium: implement clamping controls (ARB_color_buffer_float)
BTW this changes the gallium interface.
Some rather cosmetic changes by Marek.
Squashed commit of the following:
commit
513b37d484f0318311e84bb86ed4c93cdff71f13
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:17:54 2010 +0200
mesa/st: respect fragment clamping in st_DrawPixels
commit
546a31e42cad459d7a7a10ebf77fc5ffcf89e9b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:17:28 2010 +0200
mesa/st: support fragment and vertex color clamping
commit
c406514a1fbee6891da4cf9ac3eebe4e4407ec13
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Tue Aug 24 21:56:37 2010 +0200
mesa/st: expose ARB_color_buffer_float if unclamping is supported
commit
d0c5ea11b6f75f3da2f4ca989115f150ebc7cf8d
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 17:53:41 2010 +0200
mesa/st: use unclamped colors
This assumes that Gallium is to be interpreted as given drivers the
responsibility to clamp these colors if necessary.
commit
aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:12:34 2010 +0200
mesa, mesa/st: handle read color clamping properly
We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
the operation mandates it. (see the removed XXX comment. -Marek)
TODO: did I get the set of operations mandating it right?
commit
76bdfcfe3ff4145a1818e6cb6e227b730a5f12d8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:18:25 2010 +0200
gallium: add color clamping to the interface
Marek Olšák [Tue, 15 Feb 2011 22:30:23 +0000 (23:30 +0100)]
mesa: implement clamping controls (ARB_color_buffer_float)
Squashed commit of the following:
Author: Marek Olšák <maraeo@gmail.com>
mesa: fix getteximage so that it doesn't clamp values
mesa: update the compute_version function
mesa: add display list support for ARB_color_buffer_float
mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float
commit
b2f6ddf907935b2594d2831ddab38cf57a1729ce
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Tue Aug 31 16:50:57 2010 +0200
mesa: document known possible deviations from ARB_color_buffer_float
commit
5458935be800c1b19d1c9d1569dc4fa30a97e8b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Tue Aug 24 21:54:56 2010 +0200
mesa: expose GL_ARB_color_buffer_float
commit
aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:12:34 2010 +0200
mesa, mesa/st: handle read color clamping properly
(I'll squash the st/mesa part to a separate commit. -Marek)
We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
the operation mandates it.
TODO: did I get the set of operations mandating it right?
commit
3a9cb5e59b676b6148c50907ce6eef5441677e36
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:09:41 2010 +0200
mesa: respect color clamping in texenv programs (v2)
Changes in v2:
- Fix attributes other than vertex color sometimes getting clamped
commit
de26f9e47e886e176aab6e5a2c3d4481efb64362
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:05:53 2010 +0200
mesa: restore color clamps on glPopAttrib
commit
a55ac3c300c189616627c05d924c40a8b55bfafa
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 18:04:26 2010 +0200
mesa: clamp color queries if and only if fragment clamping is enabled
commit
9940a3e31c2fb76cc3d28b15ea78dde369825107
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Wed Aug 25 00:00:16 2010 +0200
mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY
To do this, we make ClampColor call FLUSH_VERTICES with the appropriate
_NEW flag.
We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging
effects, despite being in the Color attrib group.
This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g
commit
6244c446e3beed5473b4e811d10787e4019f59d6
Author: Luca Barbieri <luca@luca-barbieri.com>
Date: Thu Aug 26 17:58:24 2010 +0200
mesa: add unclamped color parameters
Marek Olšák [Tue, 15 Feb 2011 23:02:15 +0000 (00:02 +0100)]
mesa: regenerate glapi files
Kenneth Graunke [Tue, 29 Mar 2011 12:49:40 +0000 (05:49 -0700)]
i965: Resolve implied moves in brw_dp_READ_4_vs_relative.
Fixes piglit test glsl-vs-arrays-3 on Sandybridge, as well as garbage
rendering in 3DMarkMobileES 2.0's Taiji demo and GLBenchmark 2.0's
Egypt and PRO demos.
NOTE: This a candidate for stable release branches. It depends on
commit
9a21bc640188e4078075b9f8e6701853a4f0bbe4.
Kenneth Graunke [Wed, 16 Mar 2011 21:09:17 +0000 (14:09 -0700)]
i965: Refactor Sandybridge implied move handling.
This was open-coded in three different places, and more are necessary.
Extract this into a function so it can be reused.
Unfortunately, not all variations were the same: in particular, one set
compression control and checked that the source register was not
ARF_NULL. This seemed like a good idea, so all cases now do so.
Vinson Lee [Tue, 29 Mar 2011 03:32:01 +0000 (20:32 -0700)]
mesa: Add missing parentheses in glBlitFramebufferEXT error strings.
Ian Romanick [Mon, 28 Mar 2011 17:13:25 +0000 (10:13 -0700)]
intel: Don't leak the tex object miptree when replacing it
Eventually the miptree refcounting interface should be cleaned up.
The assymmetry dramatically increases the probability of bugs like
this. It should be made to like like libdrm refcounting or the
refcounting style used in other parts of Mesa.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33046
Reviewed-by: Eric Anholt <eric@anholt.net>
Vinson Lee [Tue, 29 Mar 2011 00:48:37 +0000 (17:48 -0700)]
gallivm: Fix build with llvm-2.9.
The build fix of commit
40ae214067673edbda79371969d1730b6194d83e does
not apply to llvm-2.9 but rather to llvm-3.0svn.
Vinson Lee [Tue, 29 Mar 2011 00:37:33 +0000 (17:37 -0700)]
i915g: Fix build.
Fix build failures introduced with commit
0fbb64a52931ba5871aa2c5eb01b81d391f678d1.
Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
Daniel Vetter [Mon, 28 Mar 2011 19:16:12 +0000 (21:16 +0200)]
i915g: use drm ioctl to get pci devid
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Tobias Droste [Sun, 27 Mar 2011 15:11:14 +0000 (08:11 -0700)]
gallivm: Fix build with llvm-2.9
In llvm-2.9 Target->createMCInstPrinter() takes different arguments
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Henri Verbeet [Wed, 23 Mar 2011 20:58:06 +0000 (21:58 +0100)]
st/mesa: Validate state before doing blits.
Specifically, this ensures things like the front buffer actually exist. This
fixes piglt fbo/fbo-sys-blit and fd.o bug 35483.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
Fabian Bieler [Wed, 23 Mar 2011 22:27:01 +0000 (23:27 +0100)]
r600g: Handle texture fetch instructions with relative addressing
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>