Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping, update comment
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
gl.h: reorder some #defines
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate enable/disable code for GL_TEXTURE_GEN_S/T/R/Q
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate clip plane update code
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: replace macro with function
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: rename functions to follow Mesa conventions
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: 80-column wrapping
Christoph Bumiller [Thu, 17 Mar 2011 16:07:30 +0000 (17:07 +0100)]
nv50,nvc0: implement texture barrier
Tom Stellard [Fri, 18 Mar 2011 18:06:47 +0000 (11:06 -0700)]
r300/compiler: Use a 4-bit writemask in pair instructions
We now use a 4-bit writemask for all instruction types, which makes it
easier to write generic helper functions to manipulte writemasks.
NOTE: This is a candidate for the 7.10 branch.
Johannes Obermayr [Fri, 18 Mar 2011 18:10:07 +0000 (12:10 -0600)]
nouveau: Fix serious compiler warnings
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35025
Signed-off-by: Brian Paul <brianp@vmware.com>
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: minor improvements in glTexEnvfv()
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: only report up to 50 _mesa_problem() calls
http://bugs.freedesktop.org/show_bug.cgi?id=35200 reports a disk
partition getting filled because of warning messages. Stop emitting
after 50.
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
swrast: report data type in error message
Kenneth Graunke [Sat, 26 Feb 2011 08:42:24 +0000 (00:42 -0800)]
mesa: Remove the CompileShader driver hook; it's just a no-op.
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: use _mesa_get_current_tex_unit() helper in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: remove unneeded local var in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: clean up the glBindTexture early out code a bit
Kenneth Graunke [Wed, 16 Mar 2011 07:00:09 +0000 (00:00 -0700)]
i965: Rename brw_(IF|CONT)_gen6 functions to gen6_(IF|CONT).
Tobias Droste [Wed, 16 Mar 2011 17:45:29 +0000 (18:45 +0100)]
autoconf: don't use CFLAGS for cpp files
Signed-off-by: Tobias Droste <tdroste@gmx.de>
Kenneth Graunke [Wed, 16 Mar 2011 07:11:48 +0000 (00:11 -0700)]
i965: Rename BRW_DATAPORT_..._GEN6 messages to GEN6_... for consistency.
Kenneth Graunke [Wed, 16 Mar 2011 07:06:59 +0000 (00:06 -0700)]
i965: Rename BRW_SAMPLER_MESSAGE_..._GEN5 to GEN5_SAMPLER_MESSAGE.
We already have lots of GEN6_* defines; this seems more consistent.
José Fonseca [Wed, 16 Mar 2011 15:46:21 +0000 (15:46 +0000)]
svga: Leave any_user_vertex_buffers flag alone.
It is pointless to change, now that we don't replace user vertex buffer
with uploaded copy, per commit
52e598d200108ab9cfc9c9d828bbebdc576e9703.
José Fonseca [Wed, 16 Mar 2011 15:43:00 +0000 (15:43 +0000)]
svga: Hardcode SVGA_COMBINE_USERBUFFERS to 1.
The code no longer supports otherwise -- it relies on buffers being
uploaded via u_upload_mgr -- so make this clear.
Also, there's no need to flush after draws from user buffers, given all
user content should have been copied by then.
José Fonseca [Thu, 10 Mar 2011 14:39:08 +0000 (14:39 +0000)]
mesa: Sort extensions in extension string by year.
The years were obtained automatically by scraping the first year from
the spec text file. They are approximate.
José Fonseca [Wed, 16 Mar 2011 11:17:48 +0000 (11:17 +0000)]
svga: Use transfer information on buffer transfers.
Should prevent the assert failure
svga_buffer_flush_mapped_range: Assertion `sbuf->map.writing' failed.
on nested transfers.
José Fonseca [Wed, 16 Mar 2011 09:16:01 +0000 (09:16 +0000)]
glsl2: Silence unused added variable gcc warning.
José Fonseca [Wed, 16 Mar 2011 09:15:30 +0000 (09:15 +0000)]
mesa: Use typecast in BITFIELD64_BIT macro.
Unsigned long is 32bit on several platforms (e.g., Windows), yielding
1UL << 32 to be zero.
Note that BITFIELD64_BIT result is often assigned to variables of type
GLbitfield, instead of GLbitfield64. That's probably wrong and should be
addressed in a later change.
Brian Paul [Tue, 15 Mar 2011 15:48:26 +0000 (09:48 -0600)]
mesa: use BITFIELD64_BIT() macro
Brian Paul [Tue, 15 Mar 2011 15:48:08 +0000 (09:48 -0600)]
st/mesa: use BITFIELD64_BIT() macro in a few more places
Brian Paul [Tue, 15 Mar 2011 15:18:40 +0000 (09:18 -0600)]
glsl: add cast to silence signed/unsigned comparison warning
Brian Paul [Tue, 15 Mar 2011 15:17:46 +0000 (09:17 -0600)]
mesa: use 1UL for 64-bit unsigned constant for C++
This fixes C++ warnings where BITFIELD64_BIT() is used.
Ian Romanick [Tue, 15 Mar 2011 23:33:27 +0000 (16:33 -0700)]
glsl: Only allow unsized array assignment in an initializer
It should have been a tip when the spec says "However, implicitly
sized arrays cannot be assigned to. Note, this is a rare case that
*initializers and assignments appear to have different semantics*."
(empahsis mine)
Fixes bugzilla #34367.
NOTE: This is a candidate for stable release branches.
Daniel Vetter [Tue, 15 Mar 2011 20:49:25 +0000 (21:49 +0100)]
i915g: fix braino in the static state rework
For mip-map level rendering, both draw offset and size tend to change ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Mon, 14 Mar 2011 21:13:01 +0000 (22:13 +0100)]
i915g: implement early z
v2: Make it actually work.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Daniel Vetter [Tue, 15 Mar 2011 17:36:00 +0000 (18:36 +0100)]
i915g: split up static state
Early Z support is set in the DST_VARS command. Hence split up static
state emission to avoid reissuing to much on fragment shader changes,
especially the costly dst buffer relocations.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Eric Anholt [Sat, 12 Mar 2011 01:39:49 +0000 (17:39 -0800)]
i965: Fix alpha testing when there is no color buffer in the FBO.
We were alpha testing against an unwritten value, resulting in garbage.
(part of) Bug #35073.
Eric Anholt [Fri, 11 Mar 2011 22:50:17 +0000 (14:50 -0800)]
i965: Do our lowering passes before the loop of optimization.
The optimization loop won't reinsert noise instructions or quadop
vectors, so we were traversing the tree for nothing. Lowering vector
indexing was in the loop after do_common_optimization() to avoid the
work if it ended up that the index was actually constant, but that has
been called already in the core.
Eric Anholt [Fri, 11 Mar 2011 22:08:48 +0000 (14:08 -0800)]
glsl: Skip processing the first function's body in do_dead_functions().
It can't call anything, so there's no point.
Eric Anholt [Fri, 11 Mar 2011 22:02:46 +0000 (14:02 -0800)]
glsl: Whitespace fixup in opt_dead_functions.cpp.
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".
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.
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.
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.
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.
José Fonseca [Tue, 15 Mar 2011 15:43:33 +0000 (15:43 +0000)]
svga: Update svga_winsys_screen::buffer_map comments.
José Fonseca [Fri, 11 Mar 2011 14:00:25 +0000 (14:00 +0000)]
svga: Ensure DMA commands are serialized with unsynchronized flag is unset.
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>
Marek Olšák [Tue, 15 Mar 2011 15:25:16 +0000 (16:25 +0100)]
mesa: fix scons build
Marek Olšák [Tue, 8 Mar 2011 10:34:28 +0000 (11:34 +0100)]
r300g: implement the texture barrier
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.
Marek Olšák [Fri, 11 Mar 2011 23:15:22 +0000 (00:15 +0100)]
mesa: add display list support for NV_texture_barrier
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.
Marek Olšák [Tue, 8 Mar 2011 10:29:20 +0000 (11:29 +0100)]
mesa: add NV_texture_barrier
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>
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>
Dave Airlie [Tue, 15 Mar 2011 04:26:57 +0000 (14:26 +1000)]
glx: add ARB_create_context functions/ops to glx xml
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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.
Kenneth Graunke [Mon, 7 Feb 2011 08:11:34 +0000 (00:11 -0800)]
texture_builtins.py: Add support for 130-style Shadow sampler variants.
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.
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.
Marek Olšák [Sun, 13 Mar 2011 10:54:29 +0000 (11:54 +0100)]
r300g: clamp after blending for fixed-point formats only
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>
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.
Dave Airlie [Sun, 13 Mar 2011 23:36:47 +0000 (09:36 +1000)]
autoconf/llvm: fix build for disassembler
tested by okias on irc
José Fonseca [Sun, 13 Mar 2011 19:49:21 +0000 (19:49 +0000)]
gallivm: Fix build with llvm 2.6 on 32bit platforms
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.
José Fonseca [Sat, 12 Mar 2011 20:39:17 +0000 (20:39 +0000)]
util: Silence gcc unitialized member warning
José Fonseca [Sat, 12 Mar 2011 20:52:13 +0000 (20:52 +0000)]
draw: Fix draw_variant_output::format's type.
Christoph Bumiller [Sun, 13 Mar 2011 17:18:17 +0000 (18:18 +0100)]
nv50,nvc0: don't assert on cso with 0 vertex elements
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
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>
Jakob Bornecrantz [Sun, 13 Mar 2011 14:32:44 +0000 (15:32 +0100)]
tgsi: Fix parsing of properties with digits in the name
Jakob Bornecrantz [Sun, 13 Mar 2011 12:15:34 +0000 (13:15 +0100)]
rbug: Skip drawing on disabled shaders
Jakob Bornecrantz [Sun, 13 Mar 2011 11:31:54 +0000 (12:31 +0100)]
rbug: Remove flags from flush
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
Jakob Bornecrantz [Sun, 13 Mar 2011 12:28:08 +0000 (13:28 +0100)]
i915g: Point sprite cap could be supported
Jakob Bornecrantz [Sat, 12 Mar 2011 22:21:32 +0000 (23:21 +0100)]
i915g: Sort cap list
Christoph Bumiller [Sun, 13 Mar 2011 12:08:32 +0000 (13:08 +0100)]
nvc0: support edge flags
Christoph Bumiller [Sun, 13 Mar 2011 00:02:43 +0000 (01:02 +0100)]
nvc0: fix POLYGON_MODE_BACK macro copy/paste error
Christoph Bumiller [Sat, 12 Mar 2011 16:11:44 +0000 (17:11 +0100)]
nv50,nvc0: fix pipe context switch
Christoph Bumiller [Sun, 13 Mar 2011 12:07:54 +0000 (13:07 +0100)]
nv50,nvc0: clean up flushes
Christoph Bumiller [Sun, 13 Mar 2011 12:06:42 +0000 (13:06 +0100)]
nv50,nvc0: add some missing resource referencing