Commit Graph

43155 Commits

Author SHA1 Message Date
Brian Paul 552f54bf04 mesa: remove unneeded local var in BindTexture() 2011-03-16 21:13:31 -06:00
Brian Paul dfda559b98 mesa: clean up the glBindTexture early out code a bit 2011-03-16 21:13:31 -06:00
Kenneth Graunke 2279156fe7 i965: Rename brw_(IF|CONT)_gen6 functions to gen6_(IF|CONT). 2011-03-16 14:18:03 -07:00
Tobias Droste f3a828c21f autoconf: don't use CFLAGS for cpp files
Signed-off-by: Tobias Droste <tdroste@gmx.de>
2011-03-16 13:54:50 -07:00
Kenneth Graunke 2baac48f39 i965: Rename BRW_DATAPORT_..._GEN6 messages to GEN6_... for consistency. 2011-03-16 13:51:44 -07:00
Kenneth Graunke cc48d663f7 i965: Rename BRW_SAMPLER_MESSAGE_..._GEN5 to GEN5_SAMPLER_MESSAGE.
We already have lots of GEN6_* defines; this seems more consistent.
2011-03-16 13:51:44 -07:00
José Fonseca b47d508412 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 52e598d200.
2011-03-16 15:46:21 +00:00
José Fonseca 74651f5738 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.
2011-03-16 15:43:00 +00:00
José Fonseca 8767fe2437 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.
2011-03-16 11:38:53 +00:00
José Fonseca e08a3d674a 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.
2011-03-16 11:21:12 +00:00
José Fonseca 6b3713f8b8 glsl2: Silence unused added variable gcc warning. 2011-03-16 09:16:01 +00:00
José Fonseca 5fc5820cbc 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.
2011-03-16 09:15:30 +00:00
Brian Paul 11150e4667 mesa: use BITFIELD64_BIT() macro 2011-03-15 18:21:36 -06:00
Brian Paul aa878f94ab st/mesa: use BITFIELD64_BIT() macro in a few more places 2011-03-15 18:21:35 -06:00
Brian Paul d350ef1682 glsl: add cast to silence signed/unsigned comparison warning 2011-03-15 18:21:35 -06:00
Brian Paul d029ba9ec0 mesa: use 1UL for 64-bit unsigned constant for C++
This fixes C++ warnings where BITFIELD64_BIT() is used.
2011-03-15 18:21:35 -06:00
Ian Romanick 85caea29c1 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.
2011-03-15 16:41:23 -07:00
Daniel Vetter d04348aaf6 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>
2011-03-15 21:49:25 +01:00
Daniel Vetter 11ee41fe7f i915g: implement early z
v2: Make it actually work.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2011-03-15 18:36:25 +01:00
Daniel Vetter 288504fac7 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>
2011-03-15 18:36:00 +01:00
Eric Anholt a99447314c 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.
2011-03-15 10:14:52 -07:00
Eric Anholt b60651a17b 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.
2011-03-15 10:14:52 -07:00
Eric Anholt c75427f4c8 glsl: Skip processing the first function's body in do_dead_functions().
It can't call anything, so there's no point.
2011-03-15 10:14:51 -07:00
Eric Anholt 11af045ea8 glsl: Whitespace fixup in opt_dead_functions.cpp. 2011-03-15 10:14:51 -07:00
Eric Anholt 2b13e13594 glsl: Skip processing of expression trees in discard simplification.
It only cares about "if", "loop", and "discard".
2011-03-15 09:49:01 -07:00
Eric Anholt 05cf1ad82e 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.
2011-03-15 09:49:01 -07:00
Eric Anholt 991fa4d3d0 glsl: Skip processing expression trees in do_if_simplification().
Reduces time spent in this during glean texCombine by about 2/3.
2011-03-15 09:49:00 -07:00
Eric Anholt d3a444af2d glsl: Skip processing expression trees in optimize_redundant_jumps()
Cuts the time spent in this function during glean texCombine by 2/3.
2011-03-15 09:49:00 -07:00
José Fonseca b0fff8d17e svga: Tell the host to discard when doing writes without FLUSH_EXPLICIT. 2011-03-15 15:44:03 +00:00
José Fonseca 147ca90bd3 svga: Update svga_winsys_screen::buffer_map comments. 2011-03-15 15:43:33 +00:00
José Fonseca ef33c82bfd svga: Ensure DMA commands are serialized with unsynchronized flag is unset. 2011-03-15 15:38:18 +00:00
Jose Fonseca a946e84071 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>
2011-03-15 15:32:00 +00:00
Marek Olšák d0e805ebd8 mesa: fix scons build 2011-03-15 16:25:16 +01:00
Marek Olšák 79ddcb93fb r300g: implement the texture barrier 2011-03-15 15:58:12 +01:00
Marek Olšák aea4ed41ed gallium: add texture barrier support to the interface and st/mesa (v2)
v2: change the gallium entry point to texture_barrier.
2011-03-15 15:58:12 +01:00
Marek Olšák 9a9c1e1ae1 mesa: add display list support for NV_texture_barrier 2011-03-15 15:58:12 +01:00
Marek Olšák 7fa53f37e6 mesa: regenerate glapi files
Be sure to type "make clean" after this commit, otherwise your binaries
will segfault.
2011-03-15 15:58:00 +01:00
Marek Olšák 867f9b07d4 mesa: add NV_texture_barrier 2011-03-15 15:47:27 +01:00
Mathias Fröhlich 65942e141f 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>
2011-03-15 15:39:38 +01:00
Mathias Fröhlich baab835a1f 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>
2011-03-15 15:39:31 +01:00
Dave Airlie fedc5b03db glx: add ARB_create_context functions/ops to glx xml 2011-03-15 14:27:27 +10:00
Henri Verbeet df3d11f6ca r600g: FLT_TO_INT_FLOOR and FLT_TO_INT_RPI are vector-only instructions on Evergreen.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-15 01:15:50 +01:00
Alex Deucher 39d60610e8 r600g: fix logic error in 028987c803
Spotted by Henri on IRC.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-03-14 18:07:15 -04:00
Alex Deucher 3e30148900 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>
2011-03-14 17:53:00 -04:00
Alex Deucher d6fea4a985 r600g: Original R600 does not support per-MRT blends
Only rv6xx+ support them.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-03-14 17:47:21 -04:00
Alex Deucher 028987c803 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>
2011-03-14 17:42:19 -04:00
Henri Verbeet 1a8dc1539b 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>
2011-03-14 22:15:56 +01:00
Henri Verbeet ab1a2e454e r600g: Fix the DB_SHADER_CONTROL mask in create_ds_state().
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00
Henri Verbeet 2342e89979 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 0a6f09a76a.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00
Henri Verbeet a2ef38368b r600g: Move fetch shader register setup to r600_state.c / evergreen_state.c.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-03-14 22:15:56 +01:00