Commit Graph

145 Commits

Author SHA1 Message Date
Christian König 8f4ec55f77 r600g: Make unaligned 3D textures work on +evergreen
The layersize calculation is slightly different on +evergreen.
This makes mpeg2 video decoding and piglits texture-packed-formats
test work correctly on this hardware.
2011-08-30 15:33:51 +02:00
Kai Wasserbäch 8fb7f1a8a4 r600g: Fix include style
As explained in the thread starting at [0], the internal include style
should be »#include "path/to/header.h"« for non-system includes.

[0]
<http://news.gmane.org/find-root.php?message_id=%3c4E5802BE.6020206%40vmware.com%3e>

Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Signed-off-by: Brian Paul <brianp@vmware.com>
2011-08-29 08:02:55 -06:00
Michel Dänzer 702838a706 r600g: Handle PIPE_TRANSFER_MAP_DIRECTLY.
If the state tracker tries to map the resource directly but we can't or don't
want to do that, fail to create a transfer.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-26 18:21:18 +02:00
Marek Olšák db71537f01 r600g: don't allocate separate depth and stencil for transfer textures on EG
The state tracker expects depth and stencil pixels interleaved.
Evergreen can bind an interleaved depth-stencil resource as a colorbuffer,
but not as a zbuffer.

The hardware can do the interleaving for us when decompressing.
2011-08-19 23:12:15 +02:00
Marek Olšák 751a6ed893 r600g: hack around a problem with texture alignment 2011-08-19 23:12:11 +02:00
Marek Olšák 98a87a594b r600g: simplify the conditionals determining array mode 2011-08-19 23:12:11 +02:00
Marek Olšák 7f29824fd5 r600g: put depth and stencil into one backing buffer
For DRI2 sharing.
2011-08-19 23:12:11 +02:00
Marek Olšák 68c54abb2c r600g: fix depth-stencil on evergreen
Such that it actually works in apps which use both.

A separate buffer is allocated for stencil. The only exception is
the window-system-provided depth-stencil buffer, where depth and stencil
share the same buffer.

This fixes:
- fbo-depthstencil-GL_DEPTH24_STENCIL8-clear
- fbo-depthstencil-GL_DEPTH24_STENCIL8-drawpixels-FLOAT-and-USHORT
- fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-24_8
- fbo-depthstencil-GL_DEPTH24_STENCIL8-readpixels-FLOAT-and-USHORT
2011-08-19 23:12:11 +02:00
Marek Olšák c79e9f0ed5 r600g: enable thread offloading
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák 041ed559e1 r600g: remove an unused parameter from r600_bo_destroy
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák ab630b5768 r600g: use buffer_map/unmap from radeon_winsys
This also drops the unneeded bo_busy/wait functions.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:11 +02:00
Marek Olšák 2ce783d8dd r600g: put radeon_winsys in screen::winsys, don't include drm_driver in the pipe
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2011-08-16 09:15:10 +02:00
Marek Olšák be7407b75b gallium/util: add functions for manipulating swizzles
Some of those have been in drivers already.
2011-08-02 18:49:30 +02:00
Henri Verbeet 3093cbaad9 r600g: Get rid of leftover PB_USAGE_* flags.
These happen to work because their values are the same as the equivalent
PIPE_TRANSFER_* flags, but it's still misleading.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-18 01:36:07 +02:00
Christian König a0a22fead5 r600g: prevent hardware blitting based on resource usage
It doesn't make much sense for STAGING and STREAM resources to be
hardware blitted into VRAM.
2011-07-13 16:37:15 +02:00
Marek Olšák 89954723bf r600g: depth_buffer_float support on r600-r700 2011-07-10 21:41:17 +02:00
Henri Verbeet 88cf65a600 r600g: Get rid of an unused include in r600_texture.c.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-07-05 01:58:46 +02:00
Michel Dänzer eb2c9b5814 r600g: Fix use of uninitialized local variable extra_size.
Should fix http://bugs.freedesktop.org/show_bug.cgi?id=38566 .
2011-06-22 16:23:36 +02:00
Alex Deucher 21972c85ea r600g: fix fbo depth/stencil texture allocation for evergreen+
evergreen+ stores depth and stencil separately so when we
allocate a depth/stencil fbo, make sure we allocate enough
memory for both depth and stencil buffers.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-06-21 17:32:42 -04:00
Marek Olšák 7d488ade23 r600g: fix RGB32F texturing 2011-06-14 20:47:57 +02:00
Marek Olšák 8b558451ad r600g: implement EXT_packed_float 2011-04-29 11:31:55 +02:00
Marek Olšák de9f55437a r600g: trivially implement EXT_texture_shared_exponent
Nothing else needed.
2011-04-29 11:31:55 +02:00
Henri Verbeet b2a98c3531 r600g: Unify comment style somewhat.
Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
2011-04-25 14:06:22 +02:00
Marek Olšák def6a91a62 r600g: trivially implement LATC/3DC
Passes fbo-generatemipmap-formats.
2011-04-25 01:20:40 +02:00
Henri Verbeet 656c314573 r600g: Fix an unused variable warning. 2011-03-12 16:43:58 +01:00
Marek Olšák 7e02303497 gallium: remove flags from the flush function
The drivers have been changed so that they behave as if all of the flags
were set. This is already implicit in most hardware drivers and required
for multiple contexts.

Some state trackers were also abusing the PIPE_FLUSH_RENDER_CACHE flag
to decide whether flush_frontbuffer should be called.
New flag ST_FLUSH_FRONT has been added to st_api.h as a replacement.
2011-03-11 21:39:31 +01:00
Marek Olšák e968975cb5 gallium: remove the geom_flags param from is_format_supported 2011-03-11 21:39:30 +01:00
Marek Olšák 25485f4b69 gallium: kill is_resource_referenced
Only st/xorg used it and even incorrectly with regards to pipelined transfers.
2011-03-11 21:39:30 +01:00
Dave Airlie 137d44e0f2 r600g: disable tiling by default again.
we still have a lot of corner cases that aren't working.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-04 08:47:10 +10:00
Dave Airlie c7d239c43b r600g: change the cross over point for 2d->1d
this fixes some rendering in the fbo-generatemipmap-formats test on
my rv610.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-02 09:30:24 +10:00
Dave Airlie 929be6eb95 r600g: start using drm minor version to enable things.
If the drm minor version is > 9 (i.e. whats in drm-next),
we enable s3tc + texture tiling by default now.

this changes R600_FORCE_TILING to R600_TILING which can
be set to false to disable tiling on working drm.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-03-01 15:08:50 +10:00
Dave Airlie b2413de916 r600g: explicity set sign bits for RGTC 2011-02-25 09:18:42 +10:00
Dave Airlie c9bca01819 r600g: bc 4/5 or rgtc textures need to be tiled as well.
Make the s3tc upload code more generic.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-25 09:18:42 +10:00
Dave Airlie 69d969e8fa r600g: EXT_texture_array support.
This adds EXT_texture_array support to r600g, it passes the piglit
array-texture test but I suspect may not be complete.

It currently requires a kernel patch to fix the CS checker to allow
these, so you need to use R600_ARRAY_TEXTURE=true for now
to enable them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-24 13:26:28 +10:00
Dave Airlie dfa5928404 r600g: reorganise rgtc pieces.
when the cs checker fixes go upstream a lot of this can disappear
into a drm version check.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-18 16:00:49 +10:00
Dave Airlie 2a6cce09e3 r600g: add BC4/5 to RGTC conversion
this doesn't do anything much since the rest of mesa doesn't
support RGTC yet.
2011-02-18 09:39:23 +10:00
Dave Airlie 04903d1f63 r600g: add L8A8 SRGB formats.
this fixes the piglit mipmap generation sRGB on my rv730.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-16 16:09:43 +10:00
Dave Airlie 632918d3ec r600g: add srgb compressed formats to the list. 2011-02-16 08:54:14 +10:00
Dave Airlie 8e0437914b r600g: add support for s3tc formats.
On r600, s3tc formats require a 1D tiled texture format,
so we have to do uploads using a blit, via the 64-bit and 128-bit formats

Based on the r600c code we use a 64 and 128-bit type to do the
blits.

Still requires R600_ENABLE_S3TC until the kernel fixes are in,
this has only been tested on evergreen where the kernel doesn't
yet get in the way.
2011-02-15 14:44:09 +10:00
Dave Airlie a661dacf14 r600g: fix miptree calculations
the miptree setup and pitch storing didn't work so well for block
based things like compressed textures. The CB takes blocks, where
the texture sampler takes pixels, and transfers need bytes,

So now we store blocks/bytes and translate to pixels in the sampler.

This is necessary for s3tc to work properly.
2011-02-15 14:44:08 +10:00
Dave Airlie ea7a548d07 r600g: drop tiled flag
we can work this out from the array_mode and it makes more sense
to do that.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-15 14:44:08 +10:00
Alex Deucher 9e96ea0652 r600g: add alignment cases for linear aligned
Matches the drm and ddx.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2011-02-14 13:07:29 -05:00
Dave Airlie 596684eb93 r600g: get correct height alignment
useful for s3tc
2011-02-11 13:47:35 +10:00
Dave Airlie 0d851f6e9c r600g: handle 16/32 u/s norm formats properly
add support for the 32-bit types, also fixup the
export setting to handle types with channels > 11 bits properly

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-11 13:47:34 +10:00
Marek Olšák aa8a2224a3 r600g: use the new vertex buffer manager 2011-02-07 02:46:17 +01:00
Dave Airlie 2271c793e8 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>
2011-02-04 09:09:45 +10:00
Dave Airlie 3e9bc43fba 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>
2011-02-04 09:09:45 +10:00
Henri Verbeet 126e98966d r600g: Make the buffer and texture vbtls static const. 2011-02-03 21:13:12 +01:00
Dave Airlie aa31a5cbc7 r600g: flush differences back to DB copy. 2011-02-03 14:19:52 +10:00
Dave Airlie 417cfa60b2 r600g: fix depth hw resource copies.
With the previous fixes we can now enabled hw depth copies

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-03 14:19:37 +10:00