Commit Graph

136 Commits

Author SHA1 Message Date
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
Dave Airlie 5730d56549 r600g: only set depth bit for hw accessible depth buffers.
If we get a sw accessible buffer like the S8 texture we end up
doing depth tracking on it when there is no need since we won't
ever bind it to the hardware. This leads to a sw fallback in the
transfer destruction which leads to and endless recusion loop
of fail in transfer destroy.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-03 14:18:01 +10:00
Dave Airlie b13b7b86b2 r600g: rework dirty / depth texture tracking.
this adds a flag to keep track of whether the depth texture structure
is the flushed texture or not, so we can avoid doing flushes when
we do a hw rendering from one to the other.

it also renames flushed to dirty_db which tracks if the DB copy
has been dirtied by being bound to the hw.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-02-03 14:17:05 +10:00
Dave Airlie d0293290ad r600g: set correct pitch/offset for depth textures in flushed state.
This fixes zreaddraw in tiling mode
2011-02-03 14:12:32 +10:00
Dave Airlie aee5f1e40c r600: only decompress depth when its tile type is wrong.
If the tile type for the buffer is 1 then its been bound to the
DB at some point, we need to decompress it, otherwise its only
been bound as texture/cb so don't do anything.

This fixes 5 piglit tests here on r600g.
2011-02-01 13:02:56 +10:00
Dave Airlie 065c8696e7 r600g: fix regression in cubemap tests since eea1d8199b
Although CUBE is a reduction inst, it writes to more than just PV.X
so we need to keep the dst channel.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-01-31 13:06:17 +10:00
Henri Verbeet 38b54158b6 r600g: Update the flushed depth texture after drawing to the corresponding texture.
I know Jerome will probably rewrite the way depth textures work sometime
soon. For the time being this should at least make common depth texture usage
for shadowing work properly though.
2011-01-30 18:59:13 +01:00
Christian König a40305dcdb r600g: check if hardware blits are possible bevore enabling tilling 2011-01-21 19:47:24 +01:00
Henri Verbeet 9e964baaf3 r600g: Kill trailing whitespace. 2011-01-18 20:57:04 +01:00
Henri Verbeet 878519b73e r600g: Get rid of r600_blit_uncompress_depth_ptr. 2010-12-24 11:41:25 +01:00