summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-01-10 15:56:14 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-01-10 15:56:14 +0000
commit0374d2ec61d3e30769c4d5e6749f6472cb2cb4ac (patch)
tree32eb92b39a481483a82b10ca6be1445057acfa49 /dist
parent599c1bb3dc83da295c9423ca3ea96fe1aed946ab (diff)
Remove ttm entrypoints. That memory manager interface isn't going to see the
light of day and has already been removed in mesa master (ages ago). As a bonus, removes the annoying "falling back to classic" message on launching a gl application. ok matthieu@.
Diffstat (limited to 'dist')
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c71
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/intel/intel_ioctl.c2
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.c35
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.h5
-rw-r--r--dist/Mesa/src/mesa/drivers/dri/intel/intel_screen.c11
5 files changed, 18 insertions, 106 deletions
diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c
index 66934bc7f..7c352c0da 100644
--- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c
+++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_context.c
@@ -59,7 +59,6 @@
#include "intel_buffer_objects.h"
#include "intel_fbo.h"
#include "intel_decode.h"
-#include "intel_bufmgr_ttm.h"
#include "drirenderbuffer.h"
#include "vblank.h"
@@ -271,12 +270,6 @@ static const struct dri_extension brw_extensions[] = {
{ NULL, NULL }
};
-static const struct dri_extension ttm_extensions[] = {
- {"GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions},
- {"GL_ARB_pixel_buffer_object", NULL},
- {NULL, NULL}
-};
-
/**
* Initializes potential list of extensions if ctx == NULL, or actually enables
* extensions for a context.
@@ -291,9 +284,6 @@ void intelInitExtensions(GLcontext *ctx, GLboolean enable_imaging)
driInitExtensions(ctx, card_extensions, enable_imaging);
- if (intel == NULL || intel->ttm)
- driInitExtensions(ctx, ttm_extensions, GL_FALSE);
-
if (intel == NULL || IS_965(intel->intelScreen->deviceID))
driInitExtensions(ctx, brw_extensions, GL_FALSE);
}
@@ -409,64 +399,25 @@ static GLboolean
intel_init_bufmgr(struct intel_context *intel)
{
intelScreenPrivate *intelScreen = intel->intelScreen;
- GLboolean ttm_disable = getenv("INTEL_NO_TTM") != NULL;
- GLboolean ttm_supported;
/* If we've got a new enough DDX that's initializing TTM and giving us
* object handles for the shared buffers, use that.
*/
intel->ttm = GL_FALSE;
- if (intel->intelScreen->driScrnPriv->dri2.enabled)
- ttm_supported = GL_TRUE;
- else if (intel->intelScreen->driScrnPriv->ddx_version.minor >= 9 &&
- intel->intelScreen->drmMinor >= 11 &&
- intel->intelScreen->front.bo_handle != -1)
- ttm_supported = GL_TRUE;
- else
- ttm_supported = GL_FALSE;
-
- if (!ttm_disable && ttm_supported) {
- int bo_reuse_mode;
- intel->bufmgr = intel_bufmgr_ttm_init(intel->driFd,
- DRM_FENCE_TYPE_EXE,
- DRM_FENCE_TYPE_EXE |
- DRM_I915_FENCE_TYPE_RW,
- BATCH_SZ);
- if (intel->bufmgr != NULL)
- intel->ttm = GL_TRUE;
-
- bo_reuse_mode = driQueryOptioni(&intel->optionCache, "bo_reuse");
- switch (bo_reuse_mode) {
- case DRI_CONF_BO_REUSE_DISABLED:
- break;
- case DRI_CONF_BO_REUSE_ALL:
- intel_ttm_enable_bo_reuse(intel->bufmgr);
- break;
- }
- }
- /* Otherwise, use the classic buffer manager. */
- if (intel->bufmgr == NULL) {
- if (ttm_disable) {
- fprintf(stderr, "TTM buffer manager disabled. Using classic.\n");
- } else {
- fprintf(stderr, "Failed to initialize TTM buffer manager. "
- "Falling back to classic.\n");
- }
- if (intelScreen->tex.size == 0) {
- fprintf(stderr, "[%s:%u] Error initializing buffer manager.\n",
- __func__, __LINE__);
- return GL_FALSE;
- }
-
- intel->bufmgr = dri_bufmgr_fake_init(intelScreen->tex.offset,
- intelScreen->tex.map,
- intelScreen->tex.size,
- intel_fence_emit,
- intel_fence_wait,
- intel);
+ if (intelScreen->tex.size == 0) {
+ fprintf(stderr, "[%s:%u] Error initializing buffer manager.\n",
+ __func__, __LINE__);
+ return GL_FALSE;
}
+ intel->bufmgr = dri_bufmgr_fake_init(intelScreen->tex.offset,
+ intelScreen->tex.map,
+ intelScreen->tex.size,
+ intel_fence_emit,
+ intel_fence_wait,
+ intel);
+
return GL_TRUE;
}
diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_ioctl.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_ioctl.c
index f4566ba89..127c01ec1 100644
--- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_ioctl.c
+++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_ioctl.c
@@ -43,8 +43,6 @@
#include "drm.h"
#include "i915_drm.h"
-#include "intel_bufmgr_ttm.h"
-
#define FILE_DEBUG_FLAG DEBUG_IOCTL
int
diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.c
index 9867af905..e82ea24c9 100644
--- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.c
+++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.c
@@ -44,7 +44,6 @@
#include "intel_blit.h"
#include "intel_buffer_objects.h"
#include "dri_bufmgr.h"
-#include "intel_bufmgr_ttm.h"
#include "intel_batchbuffer.h"
#define FILE_DEBUG_FLAG DEBUG_REGION
@@ -114,19 +113,6 @@ intel_region_alloc(struct intel_context *intel,
return intel_region_alloc_internal(intel, cpp, pitch, height, 0, buffer);
}
-struct intel_region *
-intel_region_alloc_for_handle(struct intel_context *intel,
- GLuint cpp, GLuint pitch, GLuint height,
- GLuint tiled, GLuint handle)
-{
- dri_bo *buffer;
-
- buffer = intel_ttm_bo_create_from_handle(intel->bufmgr, "region", handle);
-
- return intel_region_alloc_internal(intel,
- cpp, pitch, height, tiled, buffer);
-}
-
void
intel_region_reference(struct intel_region **dst, struct intel_region *src)
{
@@ -437,20 +423,13 @@ intel_recreate_static(struct intel_context *intel,
region->height = intelScreen->height; /* needed? */
region->tiled = region_desc->tiled;
- if (intel->ttm) {
- assert(region_desc->bo_handle != -1);
- region->buffer = intel_ttm_bo_create_from_handle(intel->bufmgr,
- name,
- region_desc->bo_handle);
- } else {
- region->buffer = dri_bo_alloc_static(intel->bufmgr,
- name,
- region_desc->offset,
- intelScreen->pitch *
- intelScreen->height,
- region_desc->map,
- DRM_BO_FLAG_MEM_TT);
- }
+ region->buffer = dri_bo_alloc_static(intel->bufmgr,
+ name,
+ region_desc->offset,
+ intelScreen->pitch *
+ intelScreen->height,
+ region_desc->map,
+ DRM_BO_FLAG_MEM_TT);
assert(region->buffer != NULL);
diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.h b/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.h
index 229f79aeb..0d1dabe9c 100644
--- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.h
+++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_regions.h
@@ -66,11 +66,6 @@ struct intel_region *intel_region_alloc(struct intel_context *intel,
GLuint cpp,
GLuint pitch, GLuint height);
-struct intel_region *
-intel_region_alloc_for_handle(struct intel_context *intel,
- GLuint cpp, GLuint pitch, GLuint height,
- GLuint tiled, unsigned int handle);
-
void intel_region_reference(struct intel_region **dst,
struct intel_region *src);
diff --git a/dist/Mesa/src/mesa/drivers/dri/intel/intel_screen.c b/dist/Mesa/src/mesa/drivers/dri/intel/intel_screen.c
index 84bf2d726..d969075b5 100644
--- a/dist/Mesa/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/dist/Mesa/src/mesa/drivers/dri/intel/intel_screen.c
@@ -49,7 +49,6 @@
#include "i830_dri.h"
#include "intel_regions.h"
#include "intel_batchbuffer.h"
-#include "intel_bufmgr_ttm.h"
PUBLIC const char __driConfigOptions[] =
DRI_CONF_BEGIN
@@ -243,16 +242,6 @@ intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen,
intelScreen->depth.size = sarea->depth_size;
intelScreen->depth.tiled = sarea->depth_tiled;
- if (intelScreen->driScrnPriv->ddx_version.minor >= 9) {
- intelScreen->front.bo_handle = sarea->front_bo_handle;
- intelScreen->back.bo_handle = sarea->back_bo_handle;
- intelScreen->depth.bo_handle = sarea->depth_bo_handle;
- } else {
- intelScreen->front.bo_handle = -1;
- intelScreen->back.bo_handle = -1;
- intelScreen->depth.bo_handle = -1;
- }
-
intelScreen->tex.offset = sarea->tex_offset;
intelScreen->logTextureGranularity = sarea->log_tex_granularity;
intelScreen->tex.handle = sarea->tex_handle;