mesa.git
12 years agoi965: Fix bug in the old FS backend's projtex() calculation.
Eric Anholt [Tue, 14 Aug 2012 01:08:56 +0000 (18:08 -0700)]
i965: Fix bug in the old FS backend's projtex() calculation.

In the old backend, we looked at any FS attribute's proj_attrib_mask bits, not
just texcoords.  Now that we have _mesa_vert_result_to_frag_attrib(), we can
fill in the other FS inputs with correct proj_attrib_mask info.

NOTE: This is a candidate for stable branches.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=46644
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
12 years agomesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.
Kenneth Graunke [Mon, 11 Jun 2012 02:33:01 +0000 (19:33 -0700)]
mesa: Support GL_TEXTURE_BUFFER in GetTexLevelParameter[if]v in GL 3.1+.

The OpenGL 3.1 specification explicitly allows this.  Oddly, the
ARB_texture_buffer_object spec's issues section claims this isn't
allowed, but proceeds to explain that the extension simply doesn't edit
the underlying spec to allow it, and thus it didn't appear in the list
of legal texture targets.

Thus, this patch legalizes it only in 3.1+ contexts, but still returns
INVALID_ENUM in earlier contexts that expose ARB_texture_buffer_object.

Unfortunately, the behavior of the call is horrendously undefined.

Fixes oglconform's tbo/negative.textureParams test.

v2: Require desktop OpenGL.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Split out part of glGetTexLevelParameter into a helper function.
Kenneth Graunke [Mon, 11 Jun 2012 08:27:38 +0000 (01:27 -0700)]
mesa: Split out part of glGetTexLevelParameter into a helper function.

Move the _mesa_GetTexLevelParameter[iv] functions below the helper
function so the prototype is available.

This will be useful in the next commit.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]
Kenneth Graunke [Mon, 11 Jun 2012 02:11:55 +0000 (19:11 -0700)]
mesa: Add GL_TEXTURE_CUBE_MAP to _mesa_max_texture_levels(). [v2]

For cube maps, _mesa_generate_mipmap() calls this with
GL_TEXTURE_CUBE_MAP (the gl_texture_object's Target) rather than one
of the faces.  This caused _mesa_max_texture_levels() to return 0, which
resulted in maxLevels == -1 and the next line's assertion to fail.

This function is called from seven places:
- fbobject.c: framebuffer_texture()
- mipmap.c: _mesa_generate_mipmap()
- texgetimage.c:
  - getteximage_error_check()
  - getcompressedteximage_error_check()
- texparam.c: _mesa_GetTexLevelParameteriv()
- texstorage.c: tex_storage_error_check()

All of these (or their callers) now explicitly check for invalid targets
already, so this shouldn't cause invalid targets to slip through.
(Technically _mesa_generate_mipmap() doesn't check for invalid targets,
but the API-facing _mesa_GenerateMipmapEXT() function does.)

+2 oglconforms (float-texture/mipmap.automatic and mipmap.manual)

In addition to fixing the mipmap bug, it should also cause glTexStorage
to accept GL_TEXTURE_CUBE_MAP, which is explicitly allowed by the spec.

v2: Drop alterations to callers; this is now in a patch series that adds
    explicit checking to API functions.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Add explicit target checking to GetTexLevelParameter[if]v().
Kenneth Graunke [Mon, 11 Jun 2012 01:41:58 +0000 (18:41 -0700)]
mesa: Add explicit target checking to GetTexLevelParameter[if]v().

Previously, it relied on _mesa_max_texture_levels() for texture target
error checking.  This was somewhat dodgy, as _mesa_max_texture_levels()
is called in seven diferent places, not all of which necessarily accept
the same list of targets.

I copied the list of legal targets from _mesa_max_texture_levels(), so
this patch should not introduce any change in behavior.  Future patches
will cause the two to diverge.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agomesa: Add explicit target checking to Get[Compressed]TexImage().
Kenneth Graunke [Mon, 11 Jun 2012 02:06:23 +0000 (19:06 -0700)]
mesa: Add explicit target checking to Get[Compressed]TexImage().

Previously, they relied on _mesa_max_texture_levels() for texture target
error checking.  This was somewhat dodgy, as _mesa_max_texture_levels()
is called in seven diferent places, not all of which necessarily accept
the same list of targets.

I copied the list of legal targets from _mesa_max_texture_levels() but
removed the proxy targets, as both functions explicitly rejected those
targets.  This changes the order in which we check errors, which could
change whether we return INVALID_VALUE or INVALID_ENUM.  However, it
shouldn't change the list of accepted targets.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
12 years agollvmpipe: remove polygon stipple assertion
Brian Paul [Fri, 17 Aug 2012 14:58:15 +0000 (08:58 -0600)]
llvmpipe: remove polygon stipple assertion

It's possible for us to have an unused sampler bound when the fragment
shader itself doesn't use any samplers.  So the assertion isn't valid.

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=53616

12 years agosvga: minor code reformatting
Brian Paul [Thu, 16 Aug 2012 21:27:39 +0000 (15:27 -0600)]
svga: minor code reformatting

To be consistent with other functions.

12 years agobuild: Remove -shared from OSMesa's LDFLAGS
Matt Turner [Tue, 14 Aug 2012 19:36:01 +0000 (12:36 -0700)]
build: Remove -shared from OSMesa's LDFLAGS

Would break the static build.

12 years agobuild: Remove EXTRA_LIB_PATH
Matt Turner [Tue, 14 Aug 2012 19:33:32 +0000 (12:33 -0700)]
build: Remove EXTRA_LIB_PATH

You can add extra library paths to LDFLAGS directly.

12 years agobuild: Require X11 pkg-config files
Matt Turner [Tue, 14 Aug 2012 19:24:31 +0000 (12:24 -0700)]
build: Require X11 pkg-config files

12 years agor600g: disable tiling for 422 formats again
Marek Olšák [Thu, 16 Aug 2012 18:36:40 +0000 (20:36 +0200)]
r600g: disable tiling for 422 formats again

12 years agor600g: fix blits of subsampled formats
Marek Olšák [Tue, 7 Aug 2012 01:30:43 +0000 (03:30 +0200)]
r600g: fix blits of subsampled formats

12 years agor600g: fix copying between NPOT mipmapped compressed textures
Marek Olšák [Thu, 16 Aug 2012 17:05:22 +0000 (19:05 +0200)]
r600g: fix copying between NPOT mipmapped compressed textures

We aligned the dimensions to the blocksize, then divided by it
(in r600_blit.c), then minified, which was wrong.

The minification must be done first, not last.
This fixes piglit/fbo-generatemipmap-formats with S3TC and maybe
a bunch of other tests too. Tested on RV730.

12 years agor600g: make F2U trans-only on r600-r700
Marek Olšák [Wed, 15 Aug 2012 17:06:04 +0000 (19:06 +0200)]
r600g: make F2U trans-only on r600-r700

This fixes a failing assertion in r600_asm.c.

12 years agor600g: set CB_COLOR_INFO to INVALID for disabled colorbuffers on r600-r700
Marek Olšák [Tue, 14 Aug 2012 20:10:35 +0000 (22:10 +0200)]
r600g: set CB_COLOR_INFO to INVALID for disabled colorbuffers on r600-r700

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
12 years agor600g: rename r600_resource_texture to r600_texture
Marek Olšák [Tue, 14 Aug 2012 00:29:17 +0000 (02:29 +0200)]
r600g: rename r600_resource_texture to r600_texture

12 years agor600g: always put tiled textures in VRAM
Marek Olšák [Tue, 14 Aug 2012 00:22:13 +0000 (02:22 +0200)]
r600g: always put tiled textures in VRAM

12 years agor600g: cleanup r600_resource_texture in favor of radeon_surface
Marek Olšák [Sun, 12 Aug 2012 16:40:33 +0000 (18:40 +0200)]
r600g: cleanup r600_resource_texture in favor of radeon_surface

12 years agor600g: remove unused parameter in r600_texture_create_object
Marek Olšák [Sun, 12 Aug 2012 16:36:52 +0000 (18:36 +0200)]
r600g: remove unused parameter in r600_texture_create_object

12 years agor600g: fixup the usage flag for the flushed depth texture
Marek Olšák [Sun, 12 Aug 2012 16:22:42 +0000 (18:22 +0200)]
r600g: fixup the usage flag for the flushed depth texture

12 years agowayland-drm: close fd after the display is uninitialized
Philipp Brüschweiler [Wed, 15 Aug 2012 16:14:44 +0000 (18:14 +0200)]
wayland-drm: close fd after the display is uninitialized

This fixes a "kernel rejected pushbuf: Bad file descriptor" error on
wl_drm display destruction.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
12 years agoscons: Fix MinGW cross compilation.
José Fonseca [Wed, 15 Aug 2012 18:24:58 +0000 (19:24 +0100)]
scons: Fix MinGW cross compilation.

Compensate for the recent changes and assumptions added to
Makefiles.sources

12 years agoradeon/llvm: Lower implicit parameters before ISel
Tom Stellard [Thu, 16 Aug 2012 15:49:31 +0000 (15:49 +0000)]
radeon/llvm: Lower implicit parameters before ISel

12 years agogallium/draw: move misplaced brace
Brian Paul [Thu, 16 Aug 2012 15:16:42 +0000 (09:16 -0600)]
gallium/draw: move misplaced brace

12 years agomesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base image
Brian Paul [Fri, 10 Aug 2012 16:36:17 +0000 (10:36 -0600)]
mesa: raise GL_INVALID_OPERATION in glGenerateMipmap for missing base image

This seems to be expected by the WebGL texture-mips test.  The error makes
sense, but I haven't found (yet) any OpenGL documentation specifying this
error condition.

See http://bugs.freedesktop.org/show_bug.cgi?id=44912

Note: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agor600: update sampler, sampler_view code for the future
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
r600: update sampler, sampler_view code for the future

For when we have pipe->set_sampler_states(pipe, shader, start, num, samplers),
etc.

Reviewed-by: Marek Olšák <maraeo@gmail.com>
12 years agorbug: update data structures, functions for future changes
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
rbug: update data structures, functions for future changes

To support geom/compute/etc shaders, samplers, sampler views, etc.
To support pipe->bind_sampler_states() w/ start_slot.

12 years agogallium/trace: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
gallium/trace: add 'start' parameter to bind_sampler_states/views()

12 years agogallium/identity: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
gallium/identity: add 'start' parameter to bind_sampler_states/views()

12 years agogalahad: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
galahad: add 'start' parameter to bind_sampler_states/views()

12 years agosvga: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
svga: add 'start' parameter to bind_sampler_states/views()

12 years agollvmpipe: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
llvmpipe: add 'start' parameter to bind_sampler_states/views()

12 years agosoftpipe: add 'start' parameter to bind_sampler_states/views()
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
softpipe: add 'start' parameter to bind_sampler_states/views()

To support updating a sub-range of sampler states/views in the future.
Note that we always pass start=0 at this time.

12 years agogallium/trace: consolidate sampler, sampler_view code
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
gallium/trace: consolidate sampler, sampler_view code

12 years agogallium/identity: consolidate sampler, sampler_view code
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
gallium/identity: consolidate sampler, sampler_view code

This will simplify things when the pipe_context functions are consolidated.

12 years agost/mesa: add support for GS textures and samplers
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
st/mesa: add support for GS textures and samplers

12 years agost/mesa: combine vertex/fragment sampler state in arrays
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
st/mesa: combine vertex/fragment sampler state in arrays

As with other recent changes, put the vertex and fragment sampler state
into arrays indexed by the shader type.  This will let us easily add
support for other types of shaders in the future.

12 years agogallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #define
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
gallium: remove PIPE_MAX_VERTEX/GEOMETRY_SAMPLERS #define

PIPE_MAX_SAMPLERS, PIPE_MAX_VERTEX_SAMPLERS and PIPE_MAX_GEOMETRY_SAMPLERS
were all defined to the same value (16).

In various places we're creating arrays such as
sampler_views[PIPE_SHADER_TYPES][PIPE_MAX_SAMPLERS] so we were assuming
the same number of max samplers for all shader stages anyway.

Of course, drivers are still free to advertise different numbers of max
samplers for different shaders.

12 years agodraw: index samplers and sampler_view state by shader type
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
draw: index samplers and sampler_view state by shader type

So that we can handle GS state and other types of shaders in the future.

12 years agodraw: move tgsi-related state into a tgsi sub-struct
Brian Paul [Fri, 10 Aug 2012 02:59:44 +0000 (20:59 -0600)]
draw: move tgsi-related state into a tgsi sub-struct

To better organize things a bit.

12 years agogallium: add a shader stage/type param to some draw functions
Brian Paul [Fri, 10 Aug 2012 02:59:43 +0000 (20:59 -0600)]
gallium: add a shader stage/type param to some draw functions

To prepare for geometry shader texture support in the draw module.
Note: we still only handle the vertex shader case.

12 years agost/mesa: silence signed/unsigned comparison warning
Brian Paul [Thu, 16 Aug 2012 15:00:08 +0000 (09:00 -0600)]
st/mesa: silence signed/unsigned comparison warning

12 years agosvga: move result->key expression after result != NULL check
Brian Paul [Thu, 9 Aug 2012 16:14:51 +0000 (10:14 -0600)]
svga: move result->key expression after result != NULL check

12 years agosvga: fix result==NULL logic in emit_fs_consts()
Brian Paul [Thu, 9 Aug 2012 16:14:51 +0000 (10:14 -0600)]
svga: fix result==NULL logic in emit_fs_consts()

The previous test for result != NULL was kind of bogus since we dereferenced
the pointer earlier in the code.  Now, check for result != NULL first, then
get the result->key info.

Also, remove the useless "offset +=" code at the end.

12 years agosvga: update comment (s/SVGA_NEW_VS_RESULT/SVGA_NEW_VS_PRESCALE/)
Brian Paul [Thu, 9 Aug 2012 16:14:51 +0000 (10:14 -0600)]
svga: update comment (s/SVGA_NEW_VS_RESULT/SVGA_NEW_VS_PRESCALE/)

12 years agosvga: rename svga_hw_vs_parameters -> svga_hw_vs_constants
Brian Paul [Thu, 9 Aug 2012 16:14:51 +0000 (10:14 -0600)]
svga: rename svga_hw_vs_parameters -> svga_hw_vs_constants

and similarly for svga_hw_fs_parameters

12 years agost/mesa: index can be negative in the PROGRAM_CONSTANT case
Niels Ole Salscheider [Sun, 12 Aug 2012 16:35:10 +0000 (18:35 +0200)]
st/mesa: index can be negative in the PROGRAM_CONSTANT case

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: Brian Paul <brianp@vmware.com>
12 years agomesa: add cast to silence warning in _mesa_pack_rgba_span_from_ints()
Brian Paul [Thu, 16 Aug 2012 14:55:48 +0000 (08:55 -0600)]
mesa: add cast to silence warning in _mesa_pack_rgba_span_from_ints()

12 years agometa: remove unused variable
Brian Paul [Thu, 16 Aug 2012 14:53:55 +0000 (08:53 -0600)]
meta: remove unused variable

12 years agoradeonsi: Fix symbol conflicts with r600g.
Michel Dänzer [Thu, 16 Aug 2012 08:37:44 +0000 (10:37 +0200)]
radeonsi: Fix symbol conflicts with r600g.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50389

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: Fix memory leaks if returning early from some state functions.
Michel Dänzer [Wed, 15 Aug 2012 15:18:30 +0000 (17:18 +0200)]
radeonsi: Fix memory leaks if returning early from some state functions.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: Fix LLVM context leak.
Michel Dänzer [Wed, 15 Aug 2012 16:22:46 +0000 (18:22 +0200)]
radeonsi: Fix LLVM context leak.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Don't assign virtual address space for BO that already has one.
Michel Dänzer [Wed, 15 Aug 2012 13:59:07 +0000 (15:59 +0200)]
gallium/radeon: Don't assign virtual address space for BO that already has one.

We'd end up re-using the old one and throwing away the new one anyway, but only
after a roundtrip to the kernel.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Create hole for waste when allocating from va_offset.
Michel Dänzer [Wed, 15 Aug 2012 13:48:34 +0000 (15:48 +0200)]
gallium/radeon: Create hole for waste when allocating from va_offset.

Otherwise, the wasted area could never be used for an allocation again.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Fix potential address space loss in radeon_bomgr_force_va().
Michel Dänzer [Thu, 26 Apr 2012 10:10:02 +0000 (12:10 +0200)]
gallium/radeon: Fix potential address space loss in radeon_bomgr_force_va().

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Delete uppermost virtual address space hole if it's at the top.
Michel Dänzer [Thu, 26 Apr 2012 18:41:17 +0000 (20:41 +0200)]
gallium/radeon: Delete uppermost virtual address space hole if it's at the top.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Fix losing holes when allocating virtual address space.
Michel Dänzer [Thu, 26 Apr 2012 09:44:11 +0000 (11:44 +0200)]
gallium/radeon: Fix losing holes when allocating virtual address space.

If a hole exactly matches the allocated size plus alignment, we would fail to
preserve the alignment as a hole. This would result in never being able to use
the alignment area for an allocation again.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Merge holes when freeing virtual address space.
Michel Dänzer [Thu, 26 Apr 2012 13:26:01 +0000 (15:26 +0200)]
gallium/radeon: Merge holes when freeing virtual address space.

Otherwise we'll likely end up with an ever increasing amount of ever smaller
holes.

Requires keeping the list ordered wrt offsets.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agogallium/radeon: Make va_offset 64 bits wide.
Michel Dänzer [Fri, 3 Aug 2012 09:31:55 +0000 (11:31 +0200)]
gallium/radeon: Make va_offset 64 bits wide.

Otherwise we'd wrap around after 32 bits. The kernel currently limits GPU
virtual address space to 4GB anyway, but that will probably change sooner or
later, and this would result in confusing error messages when running out of
virtual address space even now.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agollvmpipe: Silence Coverity incorrect sizeof expression defect.
Vinson Lee [Sun, 12 Aug 2012 07:20:21 +0000 (00:20 -0700)]
llvmpipe: Silence Coverity incorrect sizeof expression defect.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoscons: Add option to enable floating-point textures.
Vinson Lee [Sun, 12 Aug 2012 07:02:32 +0000 (00:02 -0700)]
scons: Add option to enable floating-point textures.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
12 years agoglx/dri2: add dri2 prime support.
Dave Airlie [Fri, 12 Mar 2010 06:09:23 +0000 (16:09 +1000)]
glx/dri2: add dri2 prime support.

This adds support for having libGL pick a different driver for prime support.

DRI_PRIME env var is set to the value retrieved from the server randr
provider calls, by the calling process. (generally DRI_PRIME=1 will be
the right answer).

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoradeon/llvm: Enable if-cvt
Vincent Lejeune [Wed, 1 Aug 2012 20:49:44 +0000 (22:49 +0200)]
radeon/llvm: Enable if-cvt

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Add callbacks needed by if-cvt
Vincent Lejeune [Wed, 1 Aug 2012 20:49:43 +0000 (22:49 +0200)]
radeon/llvm: Add callbacks needed by if-cvt

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Lower branch/branch_cond into predicated jump
Vincent Lejeune [Wed, 1 Aug 2012 20:49:42 +0000 (22:49 +0200)]
radeon/llvm: Lower branch/branch_cond into predicated jump

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Add a predicated JUMP instruction
Vincent Lejeune [Wed, 1 Aug 2012 20:49:41 +0000 (22:49 +0200)]
radeon/llvm: Add a predicated JUMP instruction

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Support for predicate bit
Vincent Lejeune [Wed, 1 Aug 2012 20:49:40 +0000 (22:49 +0200)]
radeon/llvm: Support for predicate bit

Tom Stellard:
  - A few changes to predicate register defs

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Glue to handle predicate aware output from llvm
Vincent Lejeune [Fri, 3 Aug 2012 22:15:51 +0000 (00:15 +0200)]
r600g: Glue to handle predicate aware output from llvm

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Fix instruction group merge when there are predicated insts.
Vincent Lejeune [Wed, 1 Aug 2012 20:52:54 +0000 (22:52 +0200)]
r600g: Fix instruction group merge when there are predicated insts.

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeon/llvm: Do not use PV/PS if PRED_SEL does not match
Vincent Lejeune [Wed, 1 Aug 2012 20:52:53 +0000 (22:52 +0200)]
radeon/llvm: Do not use PV/PS if PRED_SEL does not match

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agor600g: Add support for predicates
Vincent Lejeune [Wed, 1 Aug 2012 20:52:52 +0000 (22:52 +0200)]
r600g: Add support for predicates

Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
12 years agoradeonsi: move ps sampler state into PM4 stream
Christian König [Sun, 12 Aug 2012 17:42:38 +0000 (19:42 +0200)]
radeonsi: move ps sampler state into PM4 stream

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: move ps sampler views into PM4 stream
Christian König [Sun, 12 Aug 2012 17:32:51 +0000 (19:32 +0200)]
radeonsi: move ps sampler views into PM4 stream

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: move vertex state descriptors into PM4 stream
Christian König [Sun, 12 Aug 2012 17:26:24 +0000 (19:26 +0200)]
radeonsi: move vertex state descriptors into PM4 stream

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeonsi: add shader data infrastructure
Christian König [Sun, 12 Aug 2012 17:16:48 +0000 (19:16 +0200)]
radeonsi: add shader data infrastructure

With this we can embed data for the shaders (like resource
descriptors) into the PM4 stream.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeon/llvm: add support to fetch temps as vectors
Christian König [Sun, 12 Aug 2012 18:06:21 +0000 (20:06 +0200)]
radeon/llvm: add support to fetch temps as vectors

Necessary for texture fetches with temp regs as source on SI.

Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agoradeon/llvm: Remove AMDGPUUtil.cpp
Tom Stellard [Thu, 26 Jul 2012 19:20:14 +0000 (19:20 +0000)]
radeon/llvm: Remove AMDGPUUtil.cpp

12 years agoradeon/llvm: Cleanup AMDGPUUtil.cpp
Apostolos Bartziokas [Thu, 26 Jul 2012 19:00:20 +0000 (15:00 -0400)]
radeon/llvm: Cleanup AMDGPUUtil.cpp

12 years agoradeon/llvm: Lower loads from USE_SGPR adddress space during DAG lowering
Tom Stellard [Thu, 26 Jul 2012 14:30:23 +0000 (14:30 +0000)]
radeon/llvm: Lower loads from USE_SGPR adddress space during DAG lowering

12 years agoradeon/llvm: Add live-in registers during DAG lowering
Tom Stellard [Wed, 25 Jul 2012 19:17:16 +0000 (19:17 +0000)]
radeon/llvm: Add live-in registers during DAG lowering

Psuedo instructions emulating live-in registers have been removed
and their corresponding intrinsics are now being lowered during DAG
lowering.

12 years agoradeon/llvm: Lower store_output intrinsic during DAG lowering
Tom Stellard [Thu, 26 Jul 2012 17:10:47 +0000 (17:10 +0000)]
radeon/llvm: Lower store_output intrinsic during DAG lowering

12 years agoradeon/llvm: Force VTX_READ instructions to use same reg for src and dst
Tom Stellard [Wed, 15 Aug 2012 18:19:27 +0000 (18:19 +0000)]
radeon/llvm: Force VTX_READ instructions to use same reg for src and dst

I was seeing some GPU hangs that seemed to be cause by ALU instructions
writing to the same register used as the source for VTX_READ.  Adding
this constraint to the VTX_READ instructions avoids this situation.

12 years agoradeonsi: fix build breakage after u_blitter changes
Marek Olšák [Wed, 15 Aug 2012 18:03:23 +0000 (20:03 +0200)]
radeonsi: fix build breakage after u_blitter changes

12 years agogallium/u_blitter: document custom meta helpers
Marek Olšák [Mon, 13 Aug 2012 21:37:30 +0000 (23:37 +0200)]
gallium/u_blitter: document custom meta helpers

12 years agor600g: disable handling of DISCARD_RANGE
Marek Olšák [Wed, 15 Aug 2012 17:11:51 +0000 (19:11 +0200)]
r600g: disable handling of DISCARD_RANGE

https://bugs.freedesktop.org/show_bug.cgi?id=53130

12 years agor600g: implement timestamp query and get_timestamp hook
Marek Olšák [Thu, 5 Jul 2012 18:06:41 +0000 (20:06 +0200)]
r600g: implement timestamp query and get_timestamp hook

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
12 years agor600g: enable MSAA on evergreen by default
Marek Olšák [Thu, 9 Aug 2012 15:22:35 +0000 (17:22 +0200)]
r600g: enable MSAA on evergreen by default

v2: add the DRM version check

12 years agor600g: implement copying between MSAA textures
Marek Olšák [Thu, 9 Aug 2012 15:21:56 +0000 (17:21 +0200)]
r600g: implement copying between MSAA textures

12 years agor600g: implement MSAA color resolve
Marek Olšák [Thu, 9 Aug 2012 15:21:10 +0000 (17:21 +0200)]
r600g: implement MSAA color resolve

12 years agor600g: implement MSAA depth-stencil decompression and resolve
Marek Olšák [Thu, 9 Aug 2012 15:17:18 +0000 (17:17 +0200)]
r600g: implement MSAA depth-stencil decompression and resolve

and integer textures, which are resolved the same as depth, I think.

12 years agor600g: implement TXQ_LZ opcode
Marek Olšák [Thu, 9 Aug 2012 15:01:46 +0000 (17:01 +0200)]
r600g: implement TXQ_LZ opcode

12 years agor600g: implement MSAA rendering and texturing for evergreen and cayman
Marek Olšák [Thu, 9 Aug 2012 14:48:45 +0000 (16:48 +0200)]
r600g: implement MSAA rendering and texturing for evergreen and cayman

12 years agor600g: implement set_sample_mask
Marek Olšák [Sun, 22 Jul 2012 05:48:52 +0000 (07:48 +0200)]
r600g: implement set_sample_mask

12 years agor600g: implement alpha-to-coverage
Marek Olšák [Sun, 22 Jul 2012 04:36:58 +0000 (06:36 +0200)]
r600g: implement alpha-to-coverage

12 years agor600g: implement alpha-to-one
Marek Olšák [Fri, 3 Aug 2012 23:50:10 +0000 (01:50 +0200)]
r600g: implement alpha-to-one

12 years agor600g: remove support for 3-channel colorbuffers
Marek Olšák [Sat, 4 Aug 2012 12:29:25 +0000 (14:29 +0200)]
r600g: remove support for 3-channel colorbuffers

We have no sampler support for them.

12 years agoconfigure.ac: bump libdrm_radeon requirement to 2.6.38
Marek Olšák [Sun, 12 Aug 2012 15:18:23 +0000 (17:18 +0200)]
configure.ac: bump libdrm_radeon requirement to 2.6.38

12 years agowinsys/radeon: print error if CS is overflowed
Marek Olšák [Sat, 4 Aug 2012 18:02:30 +0000 (20:02 +0200)]
winsys/radeon: print error if CS is overflowed

and don't submit the CS to the kernel.

12 years agogallium/u_blitter: implement X and Y texture flipping
Marek Olšák [Sat, 4 Aug 2012 01:15:29 +0000 (03:15 +0200)]
gallium/u_blitter: implement X and Y texture flipping