[Mesa-dev] [PATCH] r600g: don't enable tiling for STAGING and STREAM usage cases

2012-03-05 Thread Marek Olšák
This is a follow-up to my series.

Cc: Christian König deathsim...@vodafone.de
---
 src/gallium/drivers/r600/r600_texture.c |   13 +++--
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c 
b/src/gallium/drivers/r600/r600_texture.c
index 6222410..e55e0d2 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -623,12 +623,13 @@ struct pipe_resource *r600_texture_create(struct 
pipe_screen *screen,
unsigned array_mode = 0;
int r;
 
-   if (!(templ-flags  R600_RESOURCE_FLAG_TRANSFER) 
-   !(templ-bind  PIPE_BIND_SCANOUT)) {
-   if (rscreen-use_surface_alloc) {
-   if (permit_hardware_blit(screen, templ)) {
-   array_mode = V_038000_ARRAY_2D_TILED_THIN1;
-   }
+   if (!(templ-flags  R600_RESOURCE_FLAG_TRANSFER)) {
+   if (rscreen-use_surface_alloc 
+   !(templ-bind  PIPE_BIND_SCANOUT) 
+   templ-usage != PIPE_USAGE_STAGING 
+   templ-usage != PIPE_USAGE_STREAM 
+   permit_hardware_blit(screen, templ)) {
+   array_mode = V_038000_ARRAY_2D_TILED_THIN1;
} else if (util_format_is_compressed(templ-format)) {
array_mode = V_038000_ARRAY_1D_TILED_THIN1;
}
-- 
1.7.5.4

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] r600g: don't enable tiling for STAGING and STREAM usage cases

2012-03-05 Thread Christian König

On 05.03.2012 14:35, Marek Olšák wrote:

This is a follow-up to my series.

Cc: Christian Königdeathsim...@vodafone.de
---
  src/gallium/drivers/r600/r600_texture.c |   13 +++--
  1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_texture.c 
b/src/gallium/drivers/r600/r600_texture.c
index 6222410..e55e0d2 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -623,12 +623,13 @@ struct pipe_resource *r600_texture_create(struct 
pipe_screen *screen,
unsigned array_mode = 0;
int r;

-   if (!(templ-flags  R600_RESOURCE_FLAG_TRANSFER)
-   !(templ-bind  PIPE_BIND_SCANOUT)) {
-   if (rscreen-use_surface_alloc) {
-   if (permit_hardware_blit(screen, templ)) {
-   array_mode = V_038000_ARRAY_2D_TILED_THIN1;
-   }
+   if (!(templ-flags  R600_RESOURCE_FLAG_TRANSFER)) {
+   if (rscreen-use_surface_alloc
+   !(templ-bind  PIPE_BIND_SCANOUT)
+   templ-usage != PIPE_USAGE_STAGING
+   templ-usage != PIPE_USAGE_STREAM
+   permit_hardware_blit(screen, templ)) {
+   array_mode = V_038000_ARRAY_2D_TILED_THIN1;
} else if (util_format_is_compressed(templ-format)) {
array_mode = V_038000_ARRAY_1D_TILED_THIN1;
}

Looks good to me:

Reviewed by: Christian König christian.koe...@amd.com
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev