Commit Graph

212 Commits

Author SHA1 Message Date
Marek Olšák 48edfe0505 r600g: cleanup names around depth decompression
for consistency with the upcoming color decompression naming

Reviewed-by: Jerome Glisse <jglisse@redhat.com>
2012-08-27 04:31:00 +02:00
Marek Olšák f36c404f90 r600g: disable tiling for 422 formats again 2012-08-16 20:44:54 +02:00
Marek Olšák 6fd9218bb4 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.
2012-08-16 20:44:54 +02:00
Marek Olšák 951ac46a6a r600g: rename r600_resource_texture to r600_texture 2012-08-16 20:44:53 +02:00
Marek Olšák 952c905767 r600g: always put tiled textures in VRAM 2012-08-16 20:44:53 +02:00
Marek Olšák 773ff5705f r600g: cleanup r600_resource_texture in favor of radeon_surface 2012-08-16 20:44:53 +02:00
Marek Olšák 362a25aac5 r600g: remove unused parameter in r600_texture_create_object 2012-08-16 20:44:53 +02:00
Marek Olšák c4993d15eb r600g: fixup the usage flag for the flushed depth texture 2012-08-16 20:44:53 +02:00
Marek Olšák 94b634eca0 r600g: implement MSAA depth-stencil decompression and resolve
and integer textures, which are resolved the same as depth, I think.
2012-08-15 19:20:58 +02:00
Marek Olšák 4b78df9c81 r600g: implement MSAA rendering and texturing for evergreen and cayman 2012-08-15 19:20:57 +02:00
Marek Olšák 1ea263fccb r600g: remove unused parameters in texture functions 2012-08-07 23:39:52 +02:00
Marek Olšák e6dfc8c77b r600g: simplify create_surface 2012-08-04 14:05:51 +02:00
Marek Olšák 581f7e3101 r600g: drop the old texture allocation code
Made obsolete by the libdrm surface allocator.
2012-08-04 14:05:51 +02:00
Marek Olšák 7c371f4695 r600g: make sure copying of all texture formats is accelerated 2012-08-04 14:05:51 +02:00
Marek Olšák ea72351a91 r600g: correct texture memory size for Z32F_S8X24 on evergreen 2012-08-04 13:53:07 +02:00
Marek Olšák 43e226b6ef r600g: optimize uploading depth textures
Make it only copy the portion of a depth texture being uploaded and
not the whole 2D layer.

There is also a little code cleanup.
2012-07-18 00:32:50 +02:00
Marek Olšák b242adbe5c r600g: remove needless wrapper r600_texture_depth_flush 2012-07-18 00:21:53 +02:00
Marek Olšák 611dd52942 r600g: init_flushed_depth_texture should be able to report errors 2012-07-18 00:21:53 +02:00
Marek Olšák 018e3f75d6 r600g: fix all failing depth-stencil tests for evergreen 2012-07-17 21:22:14 +02:00
Marek Olšák e773a48a3b r600g: fix uploading non-zero mipmap levels of depth textures
This fixes piglit/depth-level-clamp.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-07-12 02:08:31 +02:00
Marek Olšák 6842d5fced r600g: don't set dirty_db_mask for a flushed depth texture
A flush depth texture is never set as a depth buffer and never flushed.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-07-12 02:08:31 +02:00
Marek Olšák dee58f94af r600g: do fine-grained depth texture flushing
- maintain a mask of which mipmap levels are dirty (instead of one big flag)
- only flush what was requested at a given point and not the whole resource
  (most often only one level and one layer has to be flushed)

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2012-07-12 02:08:30 +02:00
Vadim Girlin 3770847960 r600g: improve flushed depth texture handling v2
Use r600_resource_texture::flished_depth_texture for GPU access, and
allocate it in the VRAM. For transfers we'll allocate texture in the GTT
and store it in the r600_transfer::staging.

Improves performance when flushed depth texture is frequently used by the
GPU, e.g. in Lightsmark (~30%)

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2012-07-11 02:39:59 +04:00
Marek Olšák 0a21b561c7 r600g: fix stencil texturing with Z32_FLOAT_S8X24_UINT 2012-07-09 13:58:00 +02:00
Marek Olšák b278aba423 r600g: use u_box_origin_2d helper function 2012-07-09 13:57:59 +02:00
Marek Olšák 22d032707e r600g: remove stray semicolon 2012-07-07 15:09:57 +02:00
Marek Olšák 4891c5dc64 r600g: inline r600_blit_push_depth and use resource_copy_region
We are going to have a separate resource for depth texturing and transfers
and this is just a transfer thing.
2012-06-25 23:53:49 +02:00
Marek Olšák da98bb6fc1 r600g: split flushed depth texture creation and flushing 2012-06-25 23:53:49 +02:00
Jerome Glisse b4f0ab0b22 r600g: fix z/stencil texture creation v2
z or stencil texture should not be created with the z/stencil
flags for surface creation as they are intended to be bound
as texture.

v2: remove broken code

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-06-19 15:03:36 -04:00
Adam Rak 6a829a1b72 r600g: compute support for evergreen
Tom Stellard:
  - Updated for gallium interface changes
  - Fixed a few bugs:
    + Set the loop counter
    + Calculate the correct number of pipes
  - Added hooks into the LLVM compiler
2012-06-01 11:28:10 -04:00
Michel Dänzer 7446a0407d gallium/radeon: Fix r300g tiling breakage.
Commit 11f056a3f0 broke the r300g build. Fix it
up, and reinstate some code which isn't needed by r600g and radeonsi but is
by r300g.
2012-05-16 23:52:19 +02:00
Michel Dänzer 11f056a3f0 r600g: Set tiling information for BOs being shared.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=48747
2012-05-16 18:30:45 +02:00
Marek Olšák 0a6120244e winsys/radeon: simplify buffer map/unmap functions
The idea is not to use pb_map and pb_unmap wrappers, calling straight
into the winsys.
2012-04-29 14:46:52 +02:00
Marek Olšák a52b3338c6 u_vbuf: remove u_vbuf_resource 2012-04-24 01:39:21 +02:00
Christian König fb016854bc r600g: add support for subsampled rgb formats
v2: r600 formats are msb first!

Signed-off-by: Christian König <deathsimple@vodafone.de>
2012-03-09 12:43:49 +01:00
Marek Olšák 330b6c85c9 r600g: cleanup includes 2012-03-05 15:57:32 +01:00
Marek Olšák 0d91ddf1d4 r600g: don't enable tiling for STAGING and STREAM usage cases
Reviewed by: Christian König <christian.koenig@amd.com>
2012-03-05 14:55:46 +01:00
Marek Olšák 29e55bc5f1 winsys/radeon: add usage parameter to cs_is_buffer_referenced
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-03-05 14:22:25 +01:00
Marek Olšák 515a64a28c r600g: permit blitting between textures with STREAM and STAGING usage
Eventually I'd like to make every format blittable, so that the function
can go away.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-03-05 14:22:20 +01:00
Marek Olšák 370c8b5ee7 r600g: remove obsolete todo comments
Also use XXX in the other ones, because it's the most used word for that
purpose in Mesa.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
2012-03-05 14:22:19 +01:00
Marek Olšák 62f44f670b Revert "gallium: add flag PIPE_TRANSFER_MAP_PERMANENTLY"
This reverts commit 0950086376.

It was decided to refactor the transfer API instead of adding workarounds
to address the performance issues.
2012-03-05 13:47:49 +01:00
Marek Olšák bf4fedcef3 r600g: use u_default_transfer_flush_region for all resource types 2012-02-27 16:22:40 +01:00
Marek Olšák ab13288821 r600g: use u_default_transfer_inline_write for all resource types 2012-02-27 16:22:34 +01:00
Marek Olšák 897af1d499 r600g: cleanup r600_transfer_struct
Especially rename staging_texture to staging and change its type
to r600_resource. I will reuse it for buffers later.
2012-02-27 02:03:24 +01:00
Marek Olšák b85fc0ac7e r600g: move initialization of use_surface flag into screen_create
Also change the type to bool and give it a less ambiguous name.
2012-02-27 02:03:23 +01:00
Marek Olšák 81c0484862 r600g: properly check whether texture is busy in get_transfer 2012-02-27 02:03:23 +01:00
Marek Olšák d334d591a7 r600g: rename r600_resource_texture::depth to bool is_depth
It's used as a boolean.
2012-02-27 02:03:23 +01:00
Marek Olšák 85571ed53c r600g: remove unused variable 2012-02-14 15:49:24 +01:00
Jerome Glisse c0c979eebc r600g: add support for common surface allocator for tiling v13
Tiled surface have all kind of alignment constraint that needs to
be met. Instead of having all this code duplicated btw ddx and
mesa use common code in libdrm_radeon this also ensure that both
ddx and mesa compute those alignment in the same way.

v2 fix evergreen
v3 fix compressed texture and workaround cube texture issue by
   disabling 2D array mode for cubemap (need to check if r7xx and
   newer are also affected by the issue)
v4 fix texture array
v5 fix evergreen and newer, split surface values computation from
   mipmap tree generation so that we can get them directly from the
   ddx
v6 final fix to evergreen tile split value
v7 fix mipmap offset to avoid to use random value, use color view
   depth view to address different layer as hardware is doing some
   magic rotation depending on the layer
v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on
   evergreen, align bytes per pixel to a multiple of a dword
v9 fix handling of stencil on evergreen, half fix for compressed
   texture
v10 fix evergreen compressed texture proper support for stencil
    tile split. Fix stencil issue when array mode was clear by
    the kernel, always program stencil bo. On evergreen depth
    buffer bo need to be big enough to hold depth buffer + stencil
    buffer as even with stencil disabled things get written there.
v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen,
    old ddx overestimate those. Fix linear case when pitch*height < 64.
    Fix r300g.
v12 Fix linear case when pitch*height < 64 for old path, adapt to
    libdrm API change
v13 add libdrm check

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
2012-02-06 18:36:37 -05:00
Marek Olšák e4340c1908 r600g: merge r600_context with r600_pipe_context
The split made no sense.
2012-01-31 23:12:30 +01:00