u_blitter: add cube map array support.

This adds cube array support to the blitter.

Reviewed-by: Brian Paul <brianp@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
docs: update with ARB_texture_cube_map_array support

just mention softpipe is done, r600g will come soon.

Signed-off-by: Dave Airlie <airlied@redhat.com>
svga: Fix memory leak in svga_buffer_transfer_map.

Fixes resource leak defect reported by Coverity.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
mesa: Fix typo in glDeleteQueriesARB debug message.

"Deleete" all the extra letters!
mesa: Fix glGetVertexAttribI[u]iv now that we have real integer attribs.

Since cf438f5375e242, we store actual integers for the attribute data.
We just need to reinterpret the GLfloat array as a GLint/GLuint array
so we can read the proper data.

Fixes oglconform's glsl-vertex-attrib/basic.VertexAttribI[1234][u]i
subtests (after fixing an unrelated bug in those test cases).

v2: Use the COPY_4V macro to be concise.

NOTE: This is a candidate for the stable branches.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <maraeo@gmail.com> [v1]
mesa: Don't glPopAttrib() GL_POINT_SPRITE_COORD_ORIGIN on < OpenGL-2.0

The GL_POINT_BIT state attribute GL_POINT_SPRITE_COORD_ORIGIN
is only supported on OpenGL-2.0 or later. Prevent glPopAttrib()
from trying to restore it on OpenGL-1.4 implementations which
support GL_ARB_POINT_SPRITE, as otherwise the sequence...

glPushAttrib(GL_POINT_BIT);
glPopAttrib();

throws an GL_INVALID_ENUM error in glPopAttrib().

See also commit f778174ea1e431a7113f12c12beb4aba9e825a9f

NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
u_blitter: don't create fragment program for cube maps unless supported.

should fix http://bugs.freedesktop.org/56906

Signed-off-by: Dave Airlie <airlied@redhat.com>
util/u_rect: Make it C++ safe.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
softpipe: Handle adjacency primitives.

Not fully tested.

Based on diagrams from
http://msdn.microsoft.com/en-us/library/windows/desktop/bb205124.aspx#Primitive_Adjacency

v2: Fix based on Brian's feedback.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
util: Fix reduction of line adjacency primitives.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
tgsi: Lift the requirement of indirection being done by ADDR register.

For drivers with native integer / SM4 support this is just an hindrance.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
softpipe: Fix rgb_dst_factor == PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE.

We must multiply the factor against the destination, not the source.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
softpipe,util: Fix blending of R and RG formats.

Alpha is also 1 for formats like R32G32_FLOAT.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
galahad: Support geometry shader / stream-output methods.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
util/u_surface: Fix util_clear_depth_stencil for Z32_FLOAT_S8X24_UINT.

util_pack_z_stencil was being unconditionally invoked for all formats,
causing an assertion failure for Z32_FLOAT_S8X24_UINT.

NOTE: Candidate for the stable branches.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
trace: Support geometry shaders.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
draw: Remove redundant draw_geometry_shader_delete().

draw_delete_geometry_shader() seems to be the real one.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
util/u_surface: Support 3D/array textures in util_resource_copy_region().

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
u_blitter: fix cube array check

Pointed out by Marek on irc,

no committing after beer!

Signed-off-by: Dave Airlie <airlied@redhat.com>
r600g: add initial cube map array support (v2)

This contains the evergreen support.

Support is possible on rv670 upwards and the code in here
should work, but it doesn't and I haven't debugged it to
figure out why.

Beyond just adding support for the cube map array sampling,
r600 resinfo isn't conformant with the GL specification,
which states the number of layers should be returned for
the textureSize, so we have to track in an external
constant buffer the layers for each sampler if we need
them in the shader.

v2: only update the sampler constants if the sampler views have changed,
as suggested by Marek.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>