mesa.git
13 years agonvc0: set basic block on manual instruction insertion
Christoph Bumiller [Mon, 7 Feb 2011 18:01:54 +0000 (19:01 +0100)]
nvc0: set basic block on manual instruction insertion

13 years agonvc0: try to fix register conflicts for vector instructions
Christoph Bumiller [Mon, 7 Feb 2011 17:59:46 +0000 (18:59 +0100)]
nvc0: try to fix register conflicts for vector instructions

Vector here means using multiple 32 bit regs which are forced to be
consecutive in the register file.

This still isn't quite nice.

13 years agonvc0: reset texture base address after read transfer
Christoph Bumiller [Wed, 2 Feb 2011 20:38:07 +0000 (21:38 +0100)]
nvc0: reset texture base address after read transfer

13 years agonvc0: don't combine memory loads across block boundaries
Christoph Bumiller [Wed, 2 Feb 2011 20:23:09 +0000 (21:23 +0100)]
nvc0: don't combine memory loads across block boundaries

13 years agonvc0: detect no-op MIN/MAX, do CSE earlier to succeed more often
Christoph Bumiller [Tue, 1 Feb 2011 19:52:49 +0000 (20:52 +0100)]
nvc0: detect no-op MIN/MAX, do CSE earlier to succeed more often

13 years agomesa/st: Clean up vertex buffer unreferencing
Thomas Hellstrom [Tue, 8 Feb 2011 10:36:56 +0000 (11:36 +0100)]
mesa/st: Clean up vertex buffer unreferencing

Avoid accessing draw module internal structures outside of the draw module.
Unreference vertex buffers in error path.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agogallium/docs: fix typo
Marek Olšák [Wed, 9 Feb 2011 04:20:37 +0000 (05:20 +0100)]
gallium/docs: fix typo

13 years agor200: add cast to silence warning
Brian Paul [Wed, 9 Feb 2011 02:25:04 +0000 (19:25 -0700)]
r200: add cast to silence warning

13 years agomesa: remove unused BITFIELD64 macros
Brian Paul [Wed, 9 Feb 2011 02:25:04 +0000 (19:25 -0700)]
mesa: remove unused BITFIELD64 macros

13 years agomesa: remove _mesa_create_context_for_api()
Brian Paul [Wed, 9 Feb 2011 02:25:04 +0000 (19:25 -0700)]
mesa: remove _mesa_create_context_for_api()

Just add the gl_api parameter to _mesa_create_context().

13 years agomesa: remove _mesa_initialize_context_for_api()
Brian Paul [Wed, 9 Feb 2011 02:25:04 +0000 (19:25 -0700)]
mesa: remove _mesa_initialize_context_for_api()

Just add the gl_api parameter to _mesa_initialize_context().

13 years agomesa: add/update VERBOSE_API logging
Brian Paul [Wed, 9 Feb 2011 02:19:34 +0000 (19:19 -0700)]
mesa: add/update VERBOSE_API logging

13 years agost/mesa: fix shader deletion regression
Brian Paul [Wed, 9 Feb 2011 01:21:50 +0000 (18:21 -0700)]
st/mesa: fix shader deletion regression

Fixes a regression from commit 5cbff0932e498f49b57cbb71037b93416bfe30e0.
The problem is *some* glDrawPixels fragment programs need to be deleted,
but not all.  Use an explicit flag to indicate whether or not the program
needs to be deleted.

This should fix http://bugs.freedesktop.org/show_bug.cgi?id=34049

13 years agoi965: Add missing DEFINE_BITS for brw dirty bits.
Kenneth Graunke [Wed, 9 Feb 2011 00:56:07 +0000 (16:56 -0800)]
i965: Add missing DEFINE_BITS for brw dirty bits.

These are only used for debugging, but should be there.
Found by inspection.

13 years agoi965: Separate the BRW_NEW_(VS|WM)_CONSTBUF dirty bits.
Kenneth Graunke [Wed, 9 Feb 2011 00:55:20 +0000 (16:55 -0800)]
i965: Separate the BRW_NEW_(VS|WM)_CONSTBUF dirty bits.

These were incorrectly defined to the same value - likely due to a cut
and paste error.  Found by inspection.

13 years agoi965: Rename a few more commands to match the documentation.
Kenneth Graunke [Wed, 9 Feb 2011 00:04:48 +0000 (16:04 -0800)]
i965: Rename a few more commands to match the documentation.

13 years agost/egl: Fix platform selection
Benjamin Franzke [Tue, 8 Feb 2011 20:12:43 +0000 (21:12 +0100)]
st/egl: Fix platform selection

A break for case _EGL_PLATFORM_X11 is missing.
introduced by: 381ea0d67a6d84a34d23571c49bbf4339ffda364

13 years agoi965: Remove pointless keying of WM state on VUE size.
Eric Anholt [Sat, 5 Feb 2011 17:59:21 +0000 (11:59 -0600)]
i965: Remove pointless keying of WM state on VUE size.

13 years agomesa: Fix the Mesa IR copy propagation to not read past writes to the reg.
Eric Anholt [Fri, 4 Feb 2011 19:31:02 +0000 (13:31 -0600)]
mesa: Fix the Mesa IR copy propagation to not read past writes to the reg.

Fixes glsl-vs-post-increment-01.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
13 years agoglsl: Disable the new copy propagation pass until it gets fixed.
Eric Anholt [Tue, 8 Feb 2011 07:27:03 +0000 (23:27 -0800)]
glsl: Disable the new copy propagation pass until it gets fixed.

It apparently regressed a bunch of ES2 cases.

13 years agoglsl: Set operators '%' and '%=' to be reserved when GLSL < 1.30
Chad Versace [Fri, 4 Feb 2011 20:18:56 +0000 (12:18 -0800)]
glsl: Set operators '%' and '%=' to be reserved when GLSL < 1.30

From section 5.9 of the GLSL 1.20 spec:
   The operator modulus (%) is reserved for future use.

From section 5.8 of the GLSL 1.20 spec:
   The assignments modulus into (%=), left shift by (<<=), right shift by
   (>>=), inclusive or into ( |=), and exclusive or into ( ^=). These
   operators are reserved for future use.

The GLSL ES 1.00 spec and GLSL 1.10 spec have similiar language.

Fixes bug:
https://bugs.freedesktop.org//show_bug.cgi?id=33916

Fixes Piglit tests:
spec/glsl-1.00/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.00/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.10/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.10/compiler/assignment-operators/modulus-assign-00.frag
spec/glsl-1.20/compiler/arithmetic-operators/modulus-00.frag
spec/glsl-1.20/compiler/assignment-operators/modulus-assign-00.frag

13 years agor600g: fixup assertion
Marek Olšák [Tue, 8 Feb 2011 17:18:13 +0000 (18:18 +0100)]
r600g: fixup assertion

13 years agor600g: add a faster implementation of transfer_inline_write
Marek Olšák [Tue, 8 Feb 2011 16:36:48 +0000 (17:36 +0100)]
r600g: add a faster implementation of transfer_inline_write

u_default_transfer_inline_write uses util_copy_rect, which is kinda slow.

13 years agor600g: slab-allocate buffer and transfer structures
Marek Olšák [Tue, 8 Feb 2011 16:30:39 +0000 (17:30 +0100)]
r600g: slab-allocate buffer and transfer structures

13 years agor300g: use the same upload buffer for vertices and indices
Marek Olšák [Tue, 8 Feb 2011 15:34:22 +0000 (16:34 +0100)]
r300g: use the same upload buffer for vertices and indices

13 years agor600g: use the same upload buffer for vertices, indices, and constants
Marek Olšák [Tue, 8 Feb 2011 14:21:35 +0000 (15:21 +0100)]
r600g: use the same upload buffer for vertices, indices, and constants

This should reduce memory consumption.

13 years agomesa/st: Plug a fragment program variant parameter leak
Thomas Hellstrom [Tue, 8 Feb 2011 09:14:22 +0000 (01:14 -0800)]
mesa/st: Plug a fragment program variant parameter leak

Fixes a minor memory leak with the "engine" mesa demo.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agost/mesa: free the temporary bitmap/drawpix shader code
Brian Paul [Tue, 8 Feb 2011 15:05:14 +0000 (08:05 -0700)]
st/mesa: free the temporary bitmap/drawpix shader code

Fixes a per-shader memory leak when drawing glBitmaps, glDrawPixels
or glCopyPixels.

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

13 years agou_vbuf_mgr: add a way to specify the BIND flag for the upload buffer
Marek Olšák [Tue, 8 Feb 2011 14:20:11 +0000 (15:20 +0100)]
u_vbuf_mgr: add a way to specify the BIND flag for the upload buffer

13 years agou_vbuf_mgr: remove tabs
Marek Olšák [Tue, 8 Feb 2011 14:18:10 +0000 (15:18 +0100)]
u_vbuf_mgr: remove tabs

13 years agou_vbuf_mgr: make the uploader public
Marek Olšák [Tue, 8 Feb 2011 14:08:04 +0000 (15:08 +0100)]
u_vbuf_mgr: make the uploader public

13 years agoRevert "r600g: do not flush the uploader" (with comments)
Marek Olšák [Tue, 8 Feb 2011 11:09:29 +0000 (12:09 +0100)]
Revert "r600g: do not flush the uploader" (with comments)

This reverts commit 1c2a4f0820ff2272f993e6da28dcf8bcbbc3252a.

13 years agor600g: silence a few valgrind warnings
Brian Paterni [Tue, 8 Feb 2011 01:57:56 +0000 (19:57 -0600)]
r600g: silence a few valgrind warnings

13 years agomesa/st: Fix vertex buffer leak
Thomas Hellstrom [Mon, 7 Feb 2011 14:37:05 +0000 (15:37 +0100)]
mesa/st: Fix vertex buffer leak

Make sure we unreference the vertex buffer pointers in a local array.
This fixes huge vertex buffer / memory leaks in mesa demos "fire" and "engine".

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

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
13 years agowayland-egl: Add struct wl_egl_display argument to +wl_egl_window_create()
Kristian Høgsberg [Tue, 8 Feb 2011 01:49:58 +0000 (20:49 -0500)]
wayland-egl: Add struct wl_egl_display argument to +wl_egl_window_create()

13 years agor600g: Add support for relative addressing on constant buffers.
Henri Verbeet [Mon, 7 Feb 2011 14:22:08 +0000 (15:22 +0100)]
r600g: Add support for relative addressing on constant buffers.

Relative addressing of constant buffers can't work properly through the
kcache, since you can only address within the currently locked kcache window.
Instead, this patch binds the constant buffer as a shader resource, and then
explicitly fetches the constant using a vertex fetch with fetch type
VTX_FETCH_NO_INDEX_OFFSET from the shader. There's probably still some room
for improvement, doing the fetch right before the instruction that needs the
value may not be quite optimal for example.

13 years agor600g: Set the fetch type in r600_bc_vtx_build().
Henri Verbeet [Mon, 7 Feb 2011 14:22:08 +0000 (15:22 +0100)]
r600g: Set the fetch type in r600_bc_vtx_build().

13 years agor600g: Handle the ADD_INT instruction in r600_bc_get_num_operands().
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Handle the ADD_INT instruction in r600_bc_get_num_operands().

13 years agor600g: Generalize the pipe_add_vertex_attrib() functions.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Generalize the pipe_add_vertex_attrib() functions.

This allows them to be used for VS or PS buffer resources as well.

13 years agor600g: Remove vs_resource and ps_resource from the pipe context.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Remove vs_resource and ps_resource from the pipe context.

These are practically unused, only the vs_resource array is being abused for
fetch shader resources.

13 years agor600g: Split constants in r600_shader_from_tgsi().
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Split constants in r600_shader_from_tgsi().

13 years agor600g: Do the tgsi_full_src_register to r600_shader_src conversion in r600_shader_fro...
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Do the tgsi_full_src_register to r600_shader_src conversion in r600_shader_from_tgsi().

13 years agor600g: Split r600_bc_alu_src.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Split r600_bc_alu_src.

The r600_bc_alu_src structure is used in two different ways, as a vector and
for the individual channels of that same vector. This is somewhat fragile,
and probably confusing.

13 years agor600g: Store literal values in the r600_bc_alu_src structure.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: Store literal values in the r600_bc_alu_src structure.

This is much easier to work with, and allows use to get rid of some of the
literal handling hacks.

13 years agor600g: tgsi_dst() can't fail.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: tgsi_dst() can't fail.

13 years agor600g: tgsi_src() can't fail.
Henri Verbeet [Mon, 7 Feb 2011 14:22:07 +0000 (15:22 +0100)]
r600g: tgsi_src() can't fail.

13 years agowayland-egl: Force roundtrips to get device name and authenticate correctly
Kristian Høgsberg [Fri, 4 Feb 2011 20:37:51 +0000 (15:37 -0500)]
wayland-egl: Force roundtrips to get device name and authenticate correctly

If the client hasn't done the initial wl_display_iterate() at the time
we initialize the display, we have to do that in platform_wayland.c.
Make sure we detect that correctly instead of dup()ing fd=0, and use
the sync callback to make sure we don't wait forever for authorization that
won't happen.

13 years agoegl_dri2: Add wayland platform
Benjamin Franzke [Fri, 4 Feb 2011 11:39:40 +0000 (12:39 +0100)]
egl_dri2: Add wayland platform

13 years agoegl_dri2: Export dri2_get_driver_for_fd
Benjamin Franzke [Fri, 4 Feb 2011 11:38:58 +0000 (12:38 +0100)]
egl_dri2: Export dri2_get_driver_for_fd

13 years agoegl_dri2: Enable pixmap bind_to_texture according to the extension
Benjamin Franzke [Fri, 4 Feb 2011 11:32:30 +0000 (12:32 +0100)]
egl_dri2: Enable pixmap bind_to_texture according to the extension

13 years agost/egl: Add wayland platform
Benjamin Franzke [Fri, 4 Feb 2011 11:32:05 +0000 (12:32 +0100)]
st/egl: Add wayland platform

13 years agost/egl: drm_image: Check for MESA_drm_image
Benjamin Franzke [Fri, 4 Feb 2011 11:27:18 +0000 (12:27 +0100)]
st/egl: drm_image: Check for MESA_drm_image

MESA_drm_image isnt limited to drm platform,
others can enable the extension too.

13 years agost/egl: native_helper: Add resource_surface_import_resource
Benjamin Franzke [Fri, 4 Feb 2011 11:25:04 +0000 (12:25 +0100)]
st/egl: native_helper: Add resource_surface_import_resource

13 years agoegl: Implement libwayland-egl
Benjamin Franzke [Fri, 4 Feb 2011 11:24:08 +0000 (12:24 +0100)]
egl: Implement libwayland-egl

This library is required and defined by wayland for
EGL implementations supporting wayland.

13 years agoegl: Add wayland platform
Benjamin Franzke [Fri, 4 Feb 2011 11:22:58 +0000 (12:22 +0100)]
egl: Add wayland platform

13 years agointel: Implement dri2::{Allocate,Release}Buffer
Benjamin Franzke [Fri, 4 Feb 2011 11:01:31 +0000 (12:01 +0100)]
intel: Implement dri2::{Allocate,Release}Buffer

13 years agost/dri: Implement dri2::{Allocate,Release}Buffer
Benjamin Franzke [Fri, 4 Feb 2011 11:00:46 +0000 (12:00 +0100)]
st/dri: Implement dri2::{Allocate,Release}Buffer

13 years agoAdd dri2::{Allocate,Release}Buffer extension
Benjamin Franzke [Fri, 4 Feb 2011 10:59:12 +0000 (11:59 +0100)]
Add dri2::{Allocate,Release}Buffer extension

13 years agor600g: correctly report supported vertex formats
Marek Olšák [Mon, 7 Feb 2011 02:46:25 +0000 (03:46 +0100)]
r600g: correctly report supported vertex formats

13 years agor300g: use the new vertex buffer manager
Marek Olšák [Mon, 7 Feb 2011 01:00:44 +0000 (02:00 +0100)]
r300g: use the new vertex buffer manager

13 years agor600g: use the new vertex buffer manager
Marek Olšák [Mon, 7 Feb 2011 01:00:56 +0000 (02:00 +0100)]
r600g: use the new vertex buffer manager

13 years agoutil: import a new vertex buffer manager
Marek Olšák [Sat, 29 Jan 2011 19:53:57 +0000 (20:53 +0100)]
util: import a new vertex buffer manager

This code has originally matured in r300g and was ported to r600g several
times. It was obvious it's a code duplication.

See also comments in the header file.

13 years agor600g: do not flush the uploader
Marek Olšák [Sun, 6 Feb 2011 20:12:19 +0000 (21:12 +0100)]
r600g: do not flush the uploader

13 years agor300g: do not flush the uploader
Marek Olšák [Sun, 6 Feb 2011 20:09:38 +0000 (21:09 +0100)]
r300g: do not flush the uploader

We don't have to unmap and recreate the upload buffer when a flush occurs.
This should also prevent buffer allocations from failing.

13 years agoconfigure.ac: correctly check for libdrm_radeon version
Marek Olšák [Sun, 6 Feb 2011 14:42:55 +0000 (15:42 +0100)]
configure.ac: correctly check for libdrm_radeon version

13 years agor300g: RS400 doesn't have ZMASK
Marek Olšák [Wed, 2 Feb 2011 05:46:24 +0000 (06:46 +0100)]
r300g: RS400 doesn't have ZMASK

13 years agor600g: use surface format not underlying texture format
Dave Airlie [Sun, 6 Feb 2011 08:57:11 +0000 (18:57 +1000)]
r600g: use surface format not underlying texture format

This uses the surface format to set the CB up not the underlying texture
format, since these can and do differ.

Fixes piglit fbo-srgb.

13 years agor300/compiler: Disable register rename pass on r500
Tom Stellard [Sun, 6 Feb 2011 06:39:58 +0000 (22:39 -0800)]
r300/compiler: Disable register rename pass on r500

The scheduler and the register allocator are not good enough yet to deal
with the effects of the register rename pass.  This was causing a 50%
performance drop in Lightsmark.  The pass can be re-enabled once the
scheduler and the register allocator are more mature.  r300 and r400
still need this pass, because it prevents a lot of shaders from using
too many texture indirections.

NOTE: This is a candidate for the 7.10 branch.

13 years agor300/compiler: Don't count BEGIN_TEX instructions in the compiler stats
Tom Stellard [Sat, 5 Feb 2011 08:27:24 +0000 (00:27 -0800)]
r300/compiler: Don't count BEGIN_TEX instructions in the compiler stats

13 years agomesa/965: add support for GL_EXT_framebuffer_sRGB (v2)
Dave Airlie [Fri, 28 Jan 2011 04:16:00 +0000 (14:16 +1000)]
mesa/965: add support for GL_EXT_framebuffer_sRGB (v2)

This adds i965 support for GL_EXT_framebuffer_sRGB, it introduces a new
constant to say that the driver can support sRGB enabled FBOs since enabling
the extension doesn't mean the driver can actually support sRGB.

Also adds the suggested state flush in the core code suggested by Brian.

fix the ARB_fbo color encoding.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: Fix error checks in GetVertexAttrib functions
Ian Romanick [Fri, 4 Feb 2011 01:56:44 +0000 (17:56 -0800)]
mesa: Fix error checks in GetVertexAttrib functions

Querying index zero is not an error in OpenGL ES 2.0.

Querying an index larger than the value returned by
GL_MAX_VERTEX_ATTRIBS is an error in all APIs.

Fixes bugzilla #32375.

13 years agolinker: Generate link errors when ES shaders are missing stages
Ian Romanick [Fri, 4 Feb 2011 01:10:14 +0000 (17:10 -0800)]
linker: Generate link errors when ES shaders are missing stages

ES requires that a vertex shader and a fragment shader be present.

Fixes bugzilla #32214.

13 years agoglsl: Add opt_copy_propagation_elements.cpp to SConscript.
Vinson Lee [Fri, 4 Feb 2011 19:47:01 +0000 (11:47 -0800)]
glsl: Add opt_copy_propagation_elements.cpp to SConscript.

Fixes SCons build.

13 years agoi965: Drop the dead tracking of color_regions[].
Eric Anholt [Mon, 31 Jan 2011 05:13:17 +0000 (21:13 -0800)]
i965: Drop the dead tracking of color_regions[].

We pull the draw regions right out of the renderbuffers these days.

13 years agoi965: Drop the INTEL_DEBUG=state spam about the cache size check.
Eric Anholt [Thu, 20 Jan 2011 03:52:15 +0000 (19:52 -0800)]
i965: Drop the INTEL_DEBUG=state spam about the cache size check.

There's way more interesting info in INTEL_DEBUG=state if you could find
it among the state size checks.

13 years agoglsl: Remove extra checks for constant true assignment conditions.
Eric Anholt [Sat, 29 Jan 2011 21:59:14 +0000 (07:59 +1000)]
glsl: Remove extra checks for constant true assignment conditions.

These are already stripped by opt_constant_folding.cpp.

13 years agoglsl: Fix a comment typo in copy propagation.
Eric Anholt [Sat, 29 Jan 2011 21:50:21 +0000 (07:50 +1000)]
glsl: Fix a comment typo in copy propagation.

13 years agoglsl: Add a new opt_copy_propagation variant that does it channel-wise.
Eric Anholt [Tue, 25 Jan 2011 00:28:13 +0000 (10:28 +1000)]
glsl: Add a new opt_copy_propagation variant that does it channel-wise.

This patch cleans up many of the extra copies in GLSL IR introduced by
i965's scalarizing passes.  It doesn't result in a statistically
significant performance difference on nexuiz high settings (n=3) or my
demo (n=10), due to brw_fs.cpp's register coalescing covering most of
those extra moves anyway.  However, it does make the debug of wine's
GLSL shaders much more tractable, and reduces instruction count of
glsl-fs-convolution-2 from 376 to 288.

13 years agoralloc: Add missing va_end following va_copy.
Vinson Lee [Fri, 4 Feb 2011 06:10:16 +0000 (22:10 -0800)]
ralloc: Add missing va_end following va_copy.

13 years agor600g: don't set tile_type on evergreen.
Dave Airlie [Fri, 4 Feb 2011 05:26:41 +0000 (15:26 +1000)]
r600g: don't set tile_type on evergreen.

Since we never bind the actual DB to the CB/texture only the flushed one
we don't need to track the tile type at the moment.

13 years agor600g: fix evergreen sampler view + depth interaction
Dave Airlie [Fri, 4 Feb 2011 05:26:09 +0000 (15:26 +1000)]
r600g: fix evergreen sampler view + depth interaction

13 years agoutil: Change u_get_transfer_vtbl usage argument type to match prototype.
Vinson Lee [Fri, 4 Feb 2011 04:15:25 +0000 (20:15 -0800)]
util: Change u_get_transfer_vtbl usage argument type to match prototype.

The type of u_get_transfer_vtbl of the usage argument in u_transfer.h is
unsigned and not enum pipe_transfer_usage. This patch changes the type
of usage to unsigned to match the prototype in the header file.

13 years agoglsl: Add using statements for standard library functions.
Vinson Lee [Fri, 4 Feb 2011 03:19:12 +0000 (19:19 -0800)]
glsl: Add using statements for standard library functions.

Standard library functions in C++ are in the std namespace. When using
C++-style header files for the standard library, some compilers, such as
Sun Studio, provide symbols only for the std namespace and not for the
global namespace.

This patch adds using statements for standard library functions. Another
option could have been to prepend standard library function calls with
'std::'.

This patch fixes several compilation errors with Sun Studio.

13 years agor600g: get offset for correct texture when setting up CB.
Dave Airlie [Thu, 3 Feb 2011 23:38:01 +0000 (09:38 +1000)]
r600g: get offset for correct texture when setting up CB.

this fixes the mipmap tests with tiling forced on.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: avoid trying to flush the flushing texture.
Dave Airlie [Thu, 3 Feb 2011 23:36:02 +0000 (09:36 +1000)]
r600g: avoid trying to flush the flushing texture.

Since these textures still have the depth bit set.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: evergreen CB check for flushed texture
Dave Airlie [Thu, 3 Feb 2011 23:34:32 +0000 (09:34 +1000)]
r600g: evergreen CB check for flushed texture

13 years agor600g: flushing texture needs all levels.
Dave Airlie [Thu, 3 Feb 2011 23:08:32 +0000 (09:08 +1000)]
r600g: flushing texture needs all levels.

For mipmap generation we need all levels in the flushing texture.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: remove unused variables
Dave Airlie [Thu, 3 Feb 2011 23:08:18 +0000 (09:08 +1000)]
r600g: remove unused variables

13 years agor600g: add a flag to just create flushed texture without flushing.
Dave Airlie [Thu, 3 Feb 2011 23:07:08 +0000 (09:07 +1000)]
r600g: add a flag to just create flushed texture without flushing.

This just adds a flag to create the texture without doing any
flushing to it. Flushing occurs in the draw function. This avoids
unnecessary flushes when we end up rebinding a CB/DB/texture due
to the blitter just restoring state.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: also check CB bindings for textures to depth flush.
Dave Airlie [Thu, 3 Feb 2011 23:06:02 +0000 (09:06 +1000)]
r600g: also check CB bindings for textures to depth flush.

This checks the color buffer bindings to make sure there is something
to flush.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600g: flush depth texture before a blit from it.
Dave Airlie [Thu, 3 Feb 2011 04:45:40 +0000 (14:45 +1000)]
r600g: flush depth texture before a blit from it.

If we are going to blit from a depth texture we need to flush
it before we blit from it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agosvga: rename a couple sampler, sampler view functions
Brian Paul [Thu, 3 Feb 2011 19:41:16 +0000 (12:41 -0700)]
svga: rename a couple sampler, sampler view functions

13 years agogallium/svga: added debug code for dumping framebuffer images (disabled)
Brian Paul [Mon, 31 Jan 2011 21:41:36 +0000 (14:41 -0700)]
gallium/svga: added debug code for dumping framebuffer images (disabled)

13 years agogallium/docs: more info about setting samplers and sampler views
Brian Paul [Thu, 3 Feb 2011 19:30:19 +0000 (12:30 -0700)]
gallium/docs: more info about setting samplers and sampler views

Plus other assorted clarifications.

13 years agocso: don't tell drivers to bind null samplers, sampler views
Brian Paul [Thu, 3 Feb 2011 18:59:59 +0000 (11:59 -0700)]
cso: don't tell drivers to bind null samplers, sampler views

Before, the set_sampler_views() and restore_sampler_views() functions
used MAX2(old,new) to tell the driver how many samplers or sampler
views to set.  This could result in cases such as:

pipe->set_fragment_sampler_views(pipe, 4, views={foo, bar, NULL, NULL})

Many/most gallium drivers would take this as-is and set
ctx->num_sampler_views=4 and ctx->sampler_views={foo, bar, NULL, NULL, ...}.
Later, loops over ctx->num_sampler_views would have to check for null
pointers.  Worse, the number of sampler views and number of sampler CSOs
could get out of sync:

ctx->num_samplers = 2
ctx->samplers = {foo, bar, ...}
ctx->num_sampler_views = 4
ctx->sampler_views={Foo, Bar, NULL, NULL, ...}

So loops over the num_samplers could run into null sampler_views pointers
or vice versa.

This fixes a failed assertion in the SVGA driver when running the Mesa
engine demo in AA line mode (and possibly other cases).

It looks like all gallium drivers are careful to unreference views
and null-out sampler CSO pointers for the units beyond what's set
with the pipe::bind_x_sampler_states() and pipe::set_x_sampler_views()
functions.

I'll update the gallium docs to explain this as well.

13 years agor600g: Make some more things static.
Henri Verbeet [Thu, 3 Feb 2011 20:10:50 +0000 (21:10 +0100)]
r600g: Make some more things static.

13 years agor600g: Get rid of the unused r600_cf_vtx_tc() function.
Henri Verbeet [Thu, 3 Feb 2011 20:10:50 +0000 (21:10 +0100)]
r600g: Get rid of the unused r600_cf_vtx_tc() function.

13 years agor300g: Make the buffer and texture vbtls static const.
Henri Verbeet [Thu, 3 Feb 2011 20:10:50 +0000 (21:10 +0100)]
r300g: Make the buffer and texture vbtls static const.

13 years agor600g: Make the buffer and texture vbtls static const.
Henri Verbeet [Thu, 3 Feb 2011 20:10:50 +0000 (21:10 +0100)]
r600g: Make the buffer and texture vbtls static const.

13 years agoegl_dri2: Add new radeon pci ids
Alex Deucher [Thu, 3 Feb 2011 19:35:54 +0000 (14:35 -0500)]
egl_dri2: Add new radeon pci ids

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>