mesa.git
13 years agoglsl: Whitespace fixup in opt_dead_functions.cpp.
Eric Anholt [Fri, 11 Mar 2011 22:02:46 +0000 (14:02 -0800)]
glsl: Whitespace fixup in opt_dead_functions.cpp.

13 years agoglsl: Skip processing of expression trees in discard simplification.
Eric Anholt [Fri, 11 Mar 2011 21:23:13 +0000 (13:23 -0800)]
glsl: Skip processing of expression trees in discard simplification.

It only cares about "if", "loop", and "discard".

13 years agoglsl: Reduce processing of expression trees in do_structure_splitting.
Eric Anholt [Fri, 11 Mar 2011 21:17:03 +0000 (13:17 -0800)]
glsl: Reduce processing of expression trees in do_structure_splitting.

Most of the time we don't have a non-uniform struct variable in the
shader, so this cuts the time spent in do_structure_splitting during
glean texCombine by about 2/3.

13 years agoglsl: Skip processing expression trees in do_if_simplification().
Eric Anholt [Fri, 11 Mar 2011 21:08:26 +0000 (13:08 -0800)]
glsl: Skip processing expression trees in do_if_simplification().

Reduces time spent in this during glean texCombine by about 2/3.

13 years agoglsl: Skip processing expression trees in optimize_redundant_jumps()
Eric Anholt [Fri, 11 Mar 2011 21:03:54 +0000 (13:03 -0800)]
glsl: Skip processing expression trees in optimize_redundant_jumps()

Cuts the time spent in this function during glean texCombine by 2/3.

13 years agosvga: Tell the host to discard when doing writes without FLUSH_EXPLICIT.
José Fonseca [Mon, 14 Mar 2011 16:55:46 +0000 (16:55 +0000)]
svga: Tell the host to discard when doing writes without FLUSH_EXPLICIT.

13 years agosvga: Update svga_winsys_screen::buffer_map comments.
José Fonseca [Tue, 15 Mar 2011 15:43:33 +0000 (15:43 +0000)]
svga: Update svga_winsys_screen::buffer_map comments.

13 years agosvga: Ensure DMA commands are serialized with unsynchronized flag is unset.
José Fonseca [Fri, 11 Mar 2011 14:00:25 +0000 (14:00 +0000)]
svga: Ensure DMA commands are serialized with unsynchronized flag is unset.

13 years agoscons: copy hash_table.c, symbol_table.c to glsl directory
Jose Fonseca [Fri, 11 Mar 2011 23:33:18 +0000 (16:33 -0700)]
scons: copy hash_table.c, symbol_table.c to glsl directory

This fixes an issue where the .obj files wound up in the src/
directory rather than the build/ directory.  That prevented
combined 32-bit and 64-bit builds from working.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: fix scons build
Marek Olšák [Tue, 15 Mar 2011 15:25:16 +0000 (16:25 +0100)]
mesa: fix scons build

13 years agor300g: implement the texture barrier
Marek Olšák [Tue, 8 Mar 2011 10:34:28 +0000 (11:34 +0100)]
r300g: implement the texture barrier

13 years agogallium: add texture barrier support to the interface and st/mesa (v2)
Marek Olšák [Tue, 8 Mar 2011 10:32:35 +0000 (11:32 +0100)]
gallium: add texture barrier support to the interface and st/mesa (v2)

v2: change the gallium entry point to texture_barrier.

13 years agomesa: add display list support for NV_texture_barrier
Marek Olšák [Fri, 11 Mar 2011 23:15:22 +0000 (00:15 +0100)]
mesa: add display list support for NV_texture_barrier

13 years agomesa: regenerate glapi files
Marek Olšák [Tue, 8 Mar 2011 10:30:54 +0000 (11:30 +0100)]
mesa: regenerate glapi files

Be sure to type "make clean" after this commit, otherwise your binaries
will segfault.

13 years agomesa: add NV_texture_barrier
Marek Olšák [Tue, 8 Mar 2011 10:29:20 +0000 (11:29 +0100)]
mesa: add NV_texture_barrier

13 years agogallium/util: Use PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write.
Mathias Fröhlich [Thu, 10 Mar 2011 05:46:32 +0000 (06:46 +0100)]
gallium/util: Use PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write.

Additionally, to discarding the whole buffer, use
PIPE_TRANSFER_DISCARD_RANGE in pipe_buffer_write when the
write covers only part of the buffer.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
13 years agost/mesa: Make use of the new PIPE_TRANSFER_DISCARD_* for buffer object.
Mathias Fröhlich [Sat, 26 Feb 2011 07:20:34 +0000 (08:20 +0100)]
st/mesa: Make use of the new PIPE_TRANSFER_DISCARD_* for buffer object.

In memory mapping buffer objects make use of
PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE and PIPE_TRANSFER_DISCARD_RANGE
when appropriate.

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
13 years agoglx: add ARB_create_context functions/ops to glx xml
Dave Airlie [Tue, 15 Mar 2011 04:26:57 +0000 (14:26 +1000)]
glx: add ARB_create_context functions/ops to glx xml

13 years agor600g: FLT_TO_INT_FLOOR and FLT_TO_INT_RPI are vector-only instructions on Evergreen.
Henri Verbeet [Tue, 15 Mar 2011 00:13:45 +0000 (01:13 +0100)]
r600g: FLT_TO_INT_FLOOR and FLT_TO_INT_RPI are vector-only instructions on Evergreen.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: fix logic error in 028987c80362eddd39176628486a456b076f0427
Alex Deucher [Mon, 14 Mar 2011 22:07:15 +0000 (18:07 -0400)]
r600g: fix logic error in 028987c80362eddd39176628486a456b076f0427

Spotted by Henri on IRC.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: don't set per-MRT blend bits on R600
Alex Deucher [Mon, 14 Mar 2011 21:53:00 +0000 (17:53 -0400)]
r600g: don't set per-MRT blend bits on R600

It doesn't support them.  Also, we shouldn't be
emitting CB_BLENDx_CONTROL on R600 as the regs don't
exist there, but I'm not sure of the best way to deal
with this in the current r600 winsys.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: Original R600 does not support per-MRT blends
Alex Deucher [Mon, 14 Mar 2011 21:47:21 +0000 (17:47 -0400)]
r600g: Original R600 does not support per-MRT blends

Only rv6xx+ support them.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: emit SURFACE_BASE_UPDATE packet on rv6xx
Alex Deucher [Mon, 14 Mar 2011 20:58:27 +0000 (16:58 -0400)]
r600g: emit SURFACE_BASE_UPDATE packet on rv6xx

This packet is required when updating the DB, CB,
or STRMOUT base addresses on rv6xx for the surface
sync logic to work correctly.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor600g: Properly update MULTIWRITE_ENABLE in r600_pipe_shader_ps().
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Properly update MULTIWRITE_ENABLE in r600_pipe_shader_ps().

This sort of worked because blend state setup cleared MULTIWRITE_ENABLE again,
but that's not something we want to depend on.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Fix the DB_SHADER_CONTROL mask in create_ds_state().
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Fix the DB_SHADER_CONTROL mask in create_ds_state().

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Properly update DB_SHADER_CONTROL in evergreen_pipe_shader_ps().
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Properly update DB_SHADER_CONTROL in evergreen_pipe_shader_ps().

Disable Z_EXPORT / STENCIL_EXPORT / KILL_ENABLE again if a shader doesn't
use those. This is similar to 0a6f09a76a416b8672e149c520aa5bef33174223.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Move fetch shader register setup to r600_state.c / evergreen_state.c.
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Move fetch shader register setup to r600_state.c / evergreen_state.c.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Move r600_pipe_shader_ps() to r600_state.c.
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Move r600_pipe_shader_ps() to r600_state.c.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Move r600_pipe_shader_vs() to r600_state.c.
Henri Verbeet [Mon, 14 Mar 2011 21:07:44 +0000 (22:07 +0100)]
r600g: Move r600_pipe_shader_vs() to r600_state.c.

The idea behind this is that anything touching registers should be in
r600_state.c or evergreen_state.c. This is also consistent with
evergreen_pipe_shader_vs().

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Evergreen add support for log opcode.
Rafael Monica [Mon, 14 Mar 2011 10:40:12 +0000 (11:40 +0100)]
r600g: Evergreen add support for log opcode.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agoautoconf/make: Don't specify individual llvm libraries.
José Fonseca [Mon, 14 Mar 2011 19:58:22 +0000 (19:58 +0000)]
autoconf/make: Don't specify individual llvm libraries.

We need more and more of these, and it is difficult and prone to version
incompatability issues trying to single out every one of them.

This mimicks what was done in SCons.

13 years agoi965: Enable texture lookups whose return type is 'float'
Kenneth Graunke [Mon, 14 Mar 2011 18:32:24 +0000 (11:32 -0700)]
i965: Enable texture lookups whose return type is 'float'

This enables the new shadow texture functions in GLSL 1.30.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Chad Versace <chad.versace@intel.com>
13 years agoi965: Fix tex_swizzle when depth mode is GL_RED
Chad Versace [Sun, 13 Mar 2011 01:49:41 +0000 (17:49 -0800)]
i965: Fix tex_swizzle when depth mode is GL_RED

Change swizzle from (x000) to (x001).

Signed-off-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoi965: Remove dead assignment
Chad Versace [Sun, 13 Mar 2011 01:49:35 +0000 (17:49 -0800)]
i965: Remove dead assignment

The assignment on line 368, `tex_swizzles[i] = SWIZZLE_NOOP`, is rendered
dead by the reassignment on line 392.

Signed-off-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
13 years agoglsl: Explicitly specify a type when reading/printing ir_texture.
Kenneth Graunke [Fri, 25 Feb 2011 22:29:36 +0000 (14:29 -0800)]
glsl: Explicitly specify a type when reading/printing ir_texture.

This is necessary for GLSL 1.30+ shadow sampling functions, which return
a single float rather than splatting the value to a vec4 based on
GL_DEPTH_TEXTURE_MODE.

13 years agotexture_builtins.py: Add support for 130-style Shadow sampler variants.
Kenneth Graunke [Mon, 7 Feb 2011 08:11:34 +0000 (00:11 -0800)]
texture_builtins.py: Add support for 130-style Shadow sampler variants.

13 years agomesa: rename _mesa_texstore_a8 -> _mesa_texstore_unorm8
Marek Olšák [Mon, 14 Mar 2011 10:38:05 +0000 (11:38 +0100)]
mesa: rename _mesa_texstore_a8 -> _mesa_texstore_unorm8

It's a generic function capable of storing A8, L8, I8, R8.

13 years agomesa: fix up assertion in _mesa_source_buffer_exists
Marek Olšák [Mon, 14 Mar 2011 09:20:55 +0000 (10:20 +0100)]
mesa: fix up assertion in _mesa_source_buffer_exists

This was probably missed when implementing luminance and luminance alpha
render targets.

_mesa_get_format_bits checks for both GL_*_BITS and GL_TEXTURE_*_SIZE.

This fixes:
main/framebuffer.c:892: _mesa_source_buffer_exists: Assertion `....' failed.

13 years agor300g: clamp after blending for fixed-point formats only
Marek Olšák [Sun, 13 Mar 2011 10:54:29 +0000 (11:54 +0100)]
r300g: clamp after blending for fixed-point formats only

13 years agoglx: the server still needs __GLXcontext.
Dave Airlie [Mon, 14 Mar 2011 05:02:28 +0000 (15:02 +1000)]
glx: the server still needs __GLXcontext.

This file generates code for the X server and it still uses
the __GLXcontext structure name.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoir_to_mesa: do not check the number of uniforms against hw limits
Marek Olšák [Sun, 13 Mar 2011 02:12:11 +0000 (03:12 +0100)]
ir_to_mesa: do not check the number of uniforms against hw limits

The r300 compiler can eliminate unused uniforms and remap uniform locations
if their number surpasses hardware limits, so the limit is actually
NumParameters + NumUnusedParameters. This is important for some apps
under Wine to run.

Wine sometimes declares a uniform array of 256 vec4's and some Wine-specific
constants on top of that, so in total there is more uniforms than r300 can
handle. This was the main motivation for implementing the elimination
of unused constants.

We should allow drivers to implement fail & recovery paths where it makes
sense, so giving up too early especially when comes to uniforms is not
so good idea, though I agree there should be some hard limit for all drivers.

This patch fixes:
- glsl-fs-uniform-array-5
- glsl-vs-large-uniform-array
on drivers which can eliminate unused uniforms.

13 years agoautoconf/llvm: fix build for disassembler
Dave Airlie [Sun, 13 Mar 2011 23:36:47 +0000 (09:36 +1000)]
autoconf/llvm: fix build for disassembler

tested by okias on irc

13 years agogallivm: Fix build with llvm 2.6 on 32bit platforms
José Fonseca [Sun, 13 Mar 2011 19:49:21 +0000 (19:49 +0000)]
gallivm: Fix build with llvm 2.6 on 32bit platforms

13 years agogallivm: Use LLVM MC disassembler, instead of udis86.
José Fonseca [Sun, 13 Mar 2011 19:24:26 +0000 (19:24 +0000)]
gallivm: Use LLVM MC disassembler, instead of udis86.

Included in LLVM 2.7+. Unlink udis86, should support all instructions that
LLVM can emit.

13 years agoutil: Silence gcc unitialized member warning
José Fonseca [Sat, 12 Mar 2011 20:39:17 +0000 (20:39 +0000)]
util: Silence gcc unitialized member warning

13 years agodraw: Fix draw_variant_output::format's type.
José Fonseca [Sat, 12 Mar 2011 20:52:13 +0000 (20:52 +0000)]
draw: Fix draw_variant_output::format's type.

13 years agonv50,nvc0: don't assert on cso with 0 vertex elements
Christoph Bumiller [Sun, 13 Mar 2011 17:18:17 +0000 (18:18 +0100)]
nv50,nvc0: don't assert on cso with 0 vertex elements

13 years agorbug: Use the call mutex
Jakob Bornecrantz [Sun, 13 Mar 2011 14:52:52 +0000 (15:52 +0100)]
rbug: Use the call mutex

Fixes crashes in [soft|llvm]pipe when replacing shaders

13 years agor600g: Only update DB_SHADER_CONTROL once in r600_pipe_shader_ps().
Mathias Fröhlich [Sun, 27 Feb 2011 06:11:27 +0000 (07:11 +0100)]
r600g: Only update DB_SHADER_CONTROL once in r600_pipe_shader_ps().

Avoid setting the same gpu register several times in a r600_pipe_state.
Compute the final value of the register and set that one time. This avoids
some overhead in r600_context_pipe_state_set().

Signed-off-by: Mathias Fröhlich <Mathias.Froehlich@web.de>
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agotgsi: Fix parsing of properties with digits in the name
Jakob Bornecrantz [Sun, 13 Mar 2011 14:32:44 +0000 (15:32 +0100)]
tgsi: Fix parsing of properties with digits in the name

13 years agorbug: Skip drawing on disabled shaders
Jakob Bornecrantz [Sun, 13 Mar 2011 12:15:34 +0000 (13:15 +0100)]
rbug: Skip drawing on disabled shaders

13 years agorbug: Remove flags from flush
Jakob Bornecrantz [Sun, 13 Mar 2011 11:31:54 +0000 (12:31 +0100)]
rbug: Remove flags from flush

13 years agoi915g: Lie more so we get GLSL
Jakob Bornecrantz [Sun, 13 Mar 2011 12:29:49 +0000 (13:29 +0100)]
i915g: Lie more so we get GLSL

Lots of piglit tests are lazy and wants GLSL

13 years agoi915g: Point sprite cap could be supported
Jakob Bornecrantz [Sun, 13 Mar 2011 12:28:08 +0000 (13:28 +0100)]
i915g: Point sprite cap could be supported

13 years agoi915g: Sort cap list
Jakob Bornecrantz [Sat, 12 Mar 2011 22:21:32 +0000 (23:21 +0100)]
i915g: Sort cap list

13 years agonvc0: support edge flags
Christoph Bumiller [Sun, 13 Mar 2011 12:08:32 +0000 (13:08 +0100)]
nvc0: support edge flags

13 years agonvc0: fix POLYGON_MODE_BACK macro copy/paste error
Christoph Bumiller [Sun, 13 Mar 2011 00:02:43 +0000 (01:02 +0100)]
nvc0: fix POLYGON_MODE_BACK macro copy/paste error

13 years agonv50,nvc0: fix pipe context switch
Christoph Bumiller [Sat, 12 Mar 2011 16:11:44 +0000 (17:11 +0100)]
nv50,nvc0: fix pipe context switch

13 years agonv50,nvc0: clean up flushes
Christoph Bumiller [Sun, 13 Mar 2011 12:07:54 +0000 (13:07 +0100)]
nv50,nvc0: clean up flushes

13 years agonv50,nvc0: add some missing resource referencing
Christoph Bumiller [Sun, 13 Mar 2011 12:06:42 +0000 (13:06 +0100)]
nv50,nvc0: add some missing resource referencing

13 years agonvc0: mask out centroid bit for writing FP header
Christoph Bumiller [Sat, 12 Mar 2011 09:53:19 +0000 (10:53 +0100)]
nvc0: mask out centroid bit for writing FP header

It's only 2 bit per input, centroid is set in the instruction.

13 years agonvc0: identify VERTEX_QUARANTINE
Christoph Bumiller [Fri, 11 Mar 2011 10:03:33 +0000 (11:03 +0100)]
nvc0: identify VERTEX_QUARANTINE

Well, not sure what exactly it is, but it certainly doesn't contain
the control flow stack, but vertex data.

Not sure about size, I've only seen the first few KiB written, but
the binary driver seems to allocate more.

13 years agonvc0: don't enable early-z if alpha test is enabled
Christoph Bumiller [Sun, 13 Mar 2011 12:05:14 +0000 (13:05 +0100)]
nvc0: don't enable early-z if alpha test is enabled

Depth values are also written before the shader is executed, so if
early tests are enabled, fragments that failed the alpha test were
modifying the depth buffer, but they shouldn't.

13 years agonvc0: move sprite coord replace state into cso
Christoph Bumiller [Fri, 11 Mar 2011 09:00:32 +0000 (10:00 +0100)]
nvc0: move sprite coord replace state into cso

It's not dependent on any other state anymore now.

13 years agonvc0: s/nblocksx/nblocksy for height in resource_copy_region
Christoph Bumiller [Sat, 5 Mar 2011 21:29:49 +0000 (22:29 +0100)]
nvc0: s/nblocksx/nblocksy for height in resource_copy_region

13 years agonvc0: fix unitialized variable in TGSI sysval decl processing
Christoph Bumiller [Sat, 5 Mar 2011 21:28:46 +0000 (22:28 +0100)]
nvc0: fix unitialized variable in TGSI sysval decl processing

13 years agonvc0: update/fix supported instruction src modifiers
Christoph Bumiller [Sat, 5 Mar 2011 21:24:57 +0000 (22:24 +0100)]
nvc0: update/fix supported instruction src modifiers

13 years agoglsl: Document glsl_type::sampler_dimensionality
Chad Versace [Thu, 3 Mar 2011 22:07:42 +0000 (14:07 -0800)]
glsl: Document glsl_type::sampler_dimensionality

13 years agoRevert "mesa: Convert fixed function fragment program generator to GLSL IR."
Eric Anholt [Sat, 12 Mar 2011 23:00:55 +0000 (15:00 -0800)]
Revert "mesa: Convert fixed function fragment program generator to GLSL IR."

This reverts commit 7cb87dffce2c7a37f960f3a865cf92fd193dd8c5.
There were regressions (Bug #35244) and more review has been requested.

13 years agoRevert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"
Eric Anholt [Sat, 12 Mar 2011 23:00:49 +0000 (15:00 -0800)]
Revert "mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program"

This reverts commit b4452c3baad6e0379eeb7f22f2e51d13999e1323.

13 years agoRevert "i965: Use the fixed function GLSL program instead of the ARB program."
Eric Anholt [Sat, 12 Mar 2011 23:00:14 +0000 (15:00 -0800)]
Revert "i965: Use the fixed function GLSL program instead of the ARB program."

This reverts commit 81b34a4e3a7aec9cdf2781757408dc5e9eec79cb.  There
were regressions in the core change that this depends on.

13 years agoi915g: fix transfer coherency
Daniel Vetter [Sat, 12 Mar 2011 21:57:17 +0000 (22:57 +0100)]
i915g: fix transfer coherency

The kernel drm takes care of all coherency as long as we don't forget
to submit all outstanding commands in the batchbuffer ...

Also move batchbuffer initialization up because otherwise transfers
for some helper textures fail with a segmentation fault.

And kill the dead code, flushes should now be correct everywhere.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: don't recalculate fb dimension
Daniel Vetter [Fri, 11 Mar 2011 23:16:35 +0000 (00:16 +0100)]
i915g: don't recalculate fb dimension

The statetracker should do this for us correctly.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: use y-tiling when the blitter is not used
Daniel Vetter [Fri, 11 Mar 2011 15:08:11 +0000 (16:08 +0100)]
i915g: use y-tiling when the blitter is not used

The blitter is broken. Who'd have guessed?

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agoi915g: implement copy_region using u_blitter
Daniel Vetter [Fri, 11 Mar 2011 19:21:00 +0000 (20:21 +0100)]
i915g: implement copy_region using u_blitter

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>works
13 years agoi915g: fix use after free
Daniel Vetter [Fri, 11 Mar 2011 22:20:44 +0000 (23:20 +0100)]
i915g: fix use after free

Pipe templates should be copied if still needed after the create
call completes.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogallium: Delay the creation of simple helper shaders
Jakob Bornecrantz [Sat, 5 Mar 2011 12:27:00 +0000 (13:27 +0100)]
gallium: Delay the creation of simple helper shaders

13 years agor600g: Fix VS sampler view offsets for r600/r700.
Carl-Philip Hänsch [Sat, 12 Mar 2011 18:25:11 +0000 (19:25 +0100)]
r600g: Fix VS sampler view offsets for r600/r700.

077c448d184799e0d9ec962013ec784c6a5c1807 missed this.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Fix an unused variable warning.
Henri Verbeet [Wed, 9 Mar 2011 20:57:52 +0000 (21:57 +0100)]
r600g: Fix an unused variable warning.

13 years agou_blitter: Do blits in linear color space.
Henri Verbeet [Sat, 12 Mar 2011 15:33:50 +0000 (16:33 +0100)]
u_blitter: Do blits in linear color space.

Blits between sRGB and linear formats should happen in linear color space.
This fixes piglit fbo/fbo-srgb-blit.

13 years agor300/compiler: do not set TEX_IGNORE_UNCOVERED on r500
Marek Olšák [Sat, 12 Mar 2011 10:20:57 +0000 (11:20 +0100)]
r300/compiler: do not set TEX_IGNORE_UNCOVERED on r500

The docs say it can be set for direct texture lookups, but even that
causes problems.

This fixes the wireframe bug:
https://bugs.freedesktop.org/show_bug.cgi?id=32688

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

13 years agor300/compiler: TEX instructions don't support negation on source arguments
Marek Olšák [Sat, 12 Mar 2011 09:22:18 +0000 (10:22 +0100)]
r300/compiler: TEX instructions don't support negation on source arguments

This fixes piglit:
- glsl-fs-texture2d-dependent-4

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

13 years agor300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)
Marek Olšák [Sat, 12 Mar 2011 09:18:45 +0000 (10:18 +0100)]
r300/compiler: Abs doesn't cancel Negate (in the conversion to native swizzles)

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

13 years agor300/compiler: fix translating the src negate bits in pair_translate
Marek Olšák [Sat, 12 Mar 2011 08:32:16 +0000 (09:32 +0100)]
r300/compiler: fix translating the src negate bits in pair_translate

(1, -_, ...) was converted to (-1, ...) because of the negation
in the second component.
Masking out the unused bits fixes this.

Piglit:
- glsl-fs-texture2d-branching

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

13 years agost/dri: fix warning: ‘bind’ may be used uninitialized in this function
Marek Olšák [Sat, 12 Mar 2011 07:49:54 +0000 (08:49 +0100)]
st/dri: fix warning: ‘bind’ may be used uninitialized in this function

13 years agollvmpipe: fix warning: ‘t0’ may be used uninitialized in this function
Marek Olšák [Sat, 12 Mar 2011 07:48:43 +0000 (08:48 +0100)]
llvmpipe: fix warning: ‘t0’ may be used uninitialized in this function

13 years agor300g: implement fragment color clamping in the shader
Marek Olšák [Sat, 12 Mar 2011 05:11:18 +0000 (06:11 +0100)]
r300g: implement fragment color clamping in the shader

This finishes the implementation of the fragment color clamp control
for ARB_color_buffer_float. I don't wanna keep this stuff in a branch...

13 years agor300/compiler: fix the saturate modifier when applied to TEX instructions
Marek Olšák [Sat, 12 Mar 2011 05:07:24 +0000 (06:07 +0100)]
r300/compiler: fix the saturate modifier when applied to TEX instructions

This bug can only be triggered if the source texture is either signed or float.

13 years agor600g: revert unintentional commit
Adam Jackson [Fri, 11 Mar 2011 22:46:03 +0000 (17:46 -0500)]
r600g: revert unintentional commit

13 years agonouveau: Build fix
Adam Jackson [Fri, 11 Mar 2011 22:37:21 +0000 (17:37 -0500)]
nouveau: Build fix

nouveau_vieux_dri.so.tmp: undefined reference to `_mesa_need_secondary_color'

13 years agor600: Build fix
Adam Jackson [Fri, 11 Mar 2011 22:20:34 +0000 (17:20 -0500)]
r600: Build fix

r600_dri.so.tmp: undefined reference to `_mesa_rgba_logicop_enabled'

13 years agost/python: Remove flags from flush function.
Vinson Lee [Fri, 11 Mar 2011 22:00:32 +0000 (14:00 -0800)]
st/python: Remove flags from flush function.

13 years agost/python: Remove the geom_flags param from is_format_supported.
Vinson Lee [Fri, 11 Mar 2011 21:37:30 +0000 (13:37 -0800)]
st/python: Remove the geom_flags param from is_format_supported.

13 years agost/python: Clean up fence_finish.
Vinson Lee [Fri, 11 Mar 2011 21:35:06 +0000 (13:35 -0800)]
st/python: Clean up fence_finish.

13 years agoscons: Move texenvprogram.c to ff_fragment_shader.cpp.
Vinson Lee [Fri, 11 Mar 2011 21:32:41 +0000 (13:32 -0800)]
scons: Move texenvprogram.c to ff_fragment_shader.cpp.

13 years agoi965: Use the fixed function GLSL program instead of the ARB program.
Eric Anholt [Wed, 12 Jan 2011 20:37:08 +0000 (12:37 -0800)]
i965: Use the fixed function GLSL program instead of the ARB program.

This gets one more piece of the pipeline onto the new codegen backend.
Once ARB_fragment_program can generate GLSL programs, we can nuke the
old backend.

13 years agomesa: Track a computed _CurrentFragmentProgram for current gl_shader_program
Eric Anholt [Wed, 12 Jan 2011 20:27:12 +0000 (12:27 -0800)]
mesa: Track a computed _CurrentFragmentProgram for current gl_shader_program

This is like how we track FragmentProgram._Current for the computed
ARB fragment program for fixed function texenv, but this gives direct
access to the gl_shader_program for drivers to codegen from, skipping
ARB_fp.

13 years agomesa: Convert fixed function fragment program generator to GLSL IR.
Eric Anholt [Mon, 1 Nov 2010 20:16:21 +0000 (13:16 -0700)]
mesa: Convert fixed function fragment program generator to GLSL IR.

This is a step towards providing a direct route for drivers accepting
GLSL IR for codegen.  Perhaps more importantly, it runs the fixed
function fragment program through the GLSL IR optimization.  Having
seen how easy it is to make ugly fixed function texenv code that can
do unnecessary work, this may improve real applicatinos.

13 years agomesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.
Eric Anholt [Tue, 23 Nov 2010 23:55:59 +0000 (15:55 -0800)]
mesa: Add gl_MESAFogParamsOptimized for our special pre-computed fog params.

It would be nice if we handled optimized uniform math like this in
some generic way, since people often end up doing uniform expressions
in shaders, but for now keep this hard-coded like it was in the
texenvprogram code.

13 years agomesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.
Eric Anholt [Fri, 12 Nov 2010 20:04:09 +0000 (12:04 -0800)]
mesa: Add a builtin uniform for the ATI_envmap_bumpmap rotation matrix.

For fixed function fragment processing in GLSL IR, we want to be able
to reference this state value.  gl_* not explicitly permitted is
reserved, so using this variable name internally shouldn't be any
issue.