[Mesa-dev] [PATCH 05/10] r600g: remove r600_resource.h

Marek Olšák maraeo at gmail.com
Mon Feb 10 18:24:03 PST 2014


From: Marek Olšák <marek.olsak at amd.com>

---
 src/gallium/drivers/r600/compute_memory_pool.c |  1 -
 src/gallium/drivers/r600/evergreen_compute.c   |  1 -
 src/gallium/drivers/r600/evergreen_compute.h   |  7 ++++
 src/gallium/drivers/r600/r600_pipe.h           |  9 +++++-
 src/gallium/drivers/r600/r600_resource.h       | 45 --------------------------
 5 files changed, 15 insertions(+), 48 deletions(-)
 delete mode 100644 src/gallium/drivers/r600/r600_resource.h

diff --git a/src/gallium/drivers/r600/compute_memory_pool.c b/src/gallium/drivers/r600/compute_memory_pool.c
index fd3a04c..90d5358 100644
--- a/src/gallium/drivers/r600/compute_memory_pool.c
+++ b/src/gallium/drivers/r600/compute_memory_pool.c
@@ -33,7 +33,6 @@
 #include "util/u_memory.h"
 #include "util/u_inlines.h"
 #include "util/u_framebuffer.h"
-#include "r600_resource.h"
 #include "r600_shader.h"
 #include "r600_pipe.h"
 #include "r600_formats.h"
diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c
index 70efe5c..4a20405 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -39,7 +39,6 @@
 #include "util/u_framebuffer.h"
 #include "pipebuffer/pb_buffer.h"
 #include "evergreend.h"
-#include "r600_resource.h"
 #include "r600_shader.h"
 #include "r600_pipe.h"
 #include "r600_formats.h"
diff --git a/src/gallium/drivers/r600/evergreen_compute.h b/src/gallium/drivers/r600/evergreen_compute.h
index e6c6d8f..e760790 100644
--- a/src/gallium/drivers/r600/evergreen_compute.h
+++ b/src/gallium/drivers/r600/evergreen_compute.h
@@ -26,10 +26,17 @@
 
 #ifndef EVERGREEN_COMPUTE_H
 #define EVERGREEN_COMPUTE_H
+
 #include "r600_pipe.h"
 
 struct r600_atom;
 struct evergreen_compute_resource;
+struct compute_memory_item;
+
+struct r600_resource_global {
+	struct r600_resource base;
+	struct compute_memory_item *chunk;
+};
 
 void *evergreen_create_compute_state(struct pipe_context *ctx, const struct pipe_compute_state *cso);
 void evergreen_delete_compute_state(struct pipe_context *ctx, void *state);
diff --git a/src/gallium/drivers/r600/r600_pipe.h b/src/gallium/drivers/r600/r600_pipe.h
index 9f27a17..e732958 100644
--- a/src/gallium/drivers/r600/r600_pipe.h
+++ b/src/gallium/drivers/r600/r600_pipe.h
@@ -31,7 +31,6 @@
 
 #include "r600_llvm.h"
 #include "r600_public.h"
-#include "r600_resource.h"
 
 #include "util/u_blitter.h"
 #include "util/u_suballoc.h"
@@ -842,4 +841,12 @@ static INLINE unsigned r600_pack_float_12p4(float x)
 	       x >= 4096 ? 0xffff : x * 16;
 }
 
+/* Return if the depth format can be read without the DB->CB copy on r6xx-r7xx. */
+static INLINE bool r600_can_read_depth(struct r600_texture *rtex)
+{
+	return rtex->resource.b.b.nr_samples <= 1 &&
+	       (rtex->resource.b.b.format == PIPE_FORMAT_Z16_UNORM ||
+		rtex->resource.b.b.format == PIPE_FORMAT_Z32_FLOAT);
+}
+
 #endif
diff --git a/src/gallium/drivers/r600/r600_resource.h b/src/gallium/drivers/r600/r600_resource.h
deleted file mode 100644
index ae0bd88..0000000
--- a/src/gallium/drivers/r600/r600_resource.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright 2010 Marek Olšák <maraeo at gmail.com
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * on the rights to use, copy, modify, merge, publish, distribute, sub
- * license, and/or sell copies of the Software, and to permit persons to whom
- * the Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
- * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
- * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
- * USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-#ifndef R600_RESOURCE_H
-#define R600_RESOURCE_H
-
-#include "../../winsys/radeon/drm/radeon_winsys.h"
-#include "../radeon/r600_pipe_common.h"
-
-struct r600_screen;
-struct compute_memory_item;
-
-struct r600_resource_global {
-	struct r600_resource base;
-	struct compute_memory_item *chunk;
-};
-
-/* Return if the depth format can be read without the DB->CB copy on r6xx-r7xx. */
-static INLINE bool r600_can_read_depth(struct r600_texture *rtex)
-{
-	return rtex->resource.b.b.nr_samples <= 1 &&
-	       (rtex->resource.b.b.format == PIPE_FORMAT_Z16_UNORM ||
-		rtex->resource.b.b.format == PIPE_FORMAT_Z32_FLOAT);
-}
-
-#endif
-- 
1.8.3.2



More information about the mesa-dev mailing list