summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-02-13 00:05:39 +1000
committerDave Airlie <airlied@redhat.com>2009-02-13 00:05:39 +1000
commitd513915d27eac8a57ff7f5c1973b4a07fe288c53 (patch)
treeff299ed938494c28c6030c0ee9288725c81e031f /src/mesa/drivers/dri/radeon
parent9314d936e84cc8449d6e200b5d1df51d6d057876 (diff)
radeon/r200/r300: make build again with tracker changes
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/Makefile1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bo_drm.h5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h11
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common.c1
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_common_context.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_screen.c2
6 files changed, 24 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/radeon/Makefile b/src/mesa/drivers/dri/radeon/Makefile
index 9eb078ed8d..0a5775b11c 100644
--- a/src/mesa/drivers/dri/radeon/Makefile
+++ b/src/mesa/drivers/dri/radeon/Makefile
@@ -11,6 +11,7 @@ MINIGLX_SOURCES = server/radeon_dri.c
RADEON_COMMON_SOURCES = \
radeon_texture.c \
radeon_common_context.c \
+ radeon_common.c \
radeon_dma.c \
radeon_lock.c \
radeon_bo_legacy.c \
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h b/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
index 3cabdfc4e8..1ed13f1795 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bo_drm.h
@@ -32,7 +32,7 @@
#include <stdio.h>
#include <stdint.h>
-#include "radeon_track.h"
+//#include "radeon_track.h"
/* bo object */
#define RADEON_BO_FLAGS_MACRO_TILE 1
@@ -73,7 +73,10 @@ struct radeon_bo_funcs {
struct radeon_bo_manager {
struct radeon_bo_funcs *funcs;
int fd;
+
+#ifdef RADEON_BO_TRACK
struct radeon_tracker tracker;
+#endif
};
static inline void _radeon_bo_debug(struct radeon_bo *bo,
diff --git a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
index 36dea3be7b..b86f31f88a 100644
--- a/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
+++ b/src/mesa/drivers/dri/radeon/radeon_bocs_wrapper.h
@@ -26,7 +26,18 @@ static inline void radeon_bo_manager_gem_dtor(void *dummy)
{
}
+static inline void *radeon_cs_manager_gem_ctor(int fd)
+{
+ return NULL;
+}
+
+static inline void radeon_cs_manager_gem_dtor(void *dummy)
+{
+}
+static inline void radeon_tracker_print(void *ptr, int io)
+{
+}
#endif
#include "radeon_bo_legacy.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c
index 80e8e0d86d..f5f433b2ad 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common.c
@@ -64,6 +64,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "radeon_common.h"
#include "radeon_bocs_wrapper.h"
+#include "radeon_lock.h"
#include "radeon_drm.h"
#include "radeon_mipmap_tree.h"
diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c
index 8acde2b90c..1b8a05d045 100644
--- a/src/mesa/drivers/dri/radeon/radeon_common_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c
@@ -37,6 +37,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "utils.h"
#include "drirenderbuffer.h"
#include "vblank.h"
+#include "main/state.h"
#define DRIVER_DATE "20090101"
@@ -175,7 +176,9 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
*/
void radeonCleanupContext(radeonContextPtr radeon)
{
+#ifdef RADEON_BO_TRACK
FILE *track;
+#endif
struct radeon_renderbuffer *rb;
GLframebuffer *fb;
@@ -232,11 +235,13 @@ void radeonCleanupContext(radeonContextPtr radeon)
FREE(radeon->state.scissor.pClipRects);
radeon->state.scissor.pClipRects = 0;
}
+#ifdef RADEON_BO_TRACK
track = fopen("/tmp/tracklog", "w");
if (track) {
radeon_tracker_print(&radeon->radeonScreen->bom->tracker, track);
fclose(track);
}
+#endif
}
/* Force the context `c' to be unbound from its buffer.
diff --git a/src/mesa/drivers/dri/radeon/radeon_screen.c b/src/mesa/drivers/dri/radeon/radeon_screen.c
index e8cc3b25a8..8b06fb4d3e 100644
--- a/src/mesa/drivers/dri/radeon/radeon_screen.c
+++ b/src/mesa/drivers/dri/radeon/radeon_screen.c
@@ -1115,7 +1115,9 @@ radeonDestroyScreen( __DRIscreenPrivate *sPriv )
return;
if (screen->kernel_mm) {
+#ifdef RADEON_BO_TRACK
radeon_tracker_print(&screen->bom->tracker, stderr);
+#endif
radeon_bo_manager_gem_dtor(screen->bom);
} else {
radeon_bo_manager_legacy_dtor(screen->bom);