summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-08-06 13:31:23 -0600
committerBrian <brian@i915.localnet.net>2007-08-06 13:31:23 -0600
commitd49cee1a748c513325249a4cbaa982a60897fa77 (patch)
treea0c655d813ada72995768c14290b20a21f417ccc /src/mesa
parentf42feca07569213e24a09f640311b93937d0bd9e (diff)
more intel_context removal
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex.c12
-rw-r--r--src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c13
2 files changed, 15 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex.c b/src/mesa/drivers/dri/i915pipe/intel_tex.c
index 0990c499b5..5270094cc5 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex.c
@@ -25,8 +25,8 @@
*
**************************************************************************/
-#include "texobj.h"
-#include "intel_context.h"
+#include "main/texobj.h"
+#include "state_tracker/st_context.h"
#include "state_tracker/st_mipmap_tree.h"
#include "intel_tex.h"
@@ -73,11 +73,11 @@ static void
intelDeleteTextureObject(GLcontext *ctx,
struct gl_texture_object *texObj)
{
- struct intel_context *intel = intel_context(ctx);
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_texture_object *stObj = st_texture_object(texObj);
if (stObj->mt)
- st_miptree_release(intel->pipe, &stObj->mt);
+ st_miptree_release(pipe, &stObj->mt);
_mesa_delete_texture_object(ctx, texObj);
}
@@ -86,13 +86,13 @@ intelDeleteTextureObject(GLcontext *ctx,
static void
intelFreeTextureImageData(GLcontext * ctx, struct gl_texture_image *texImage)
{
- struct intel_context *intel = intel_context(ctx);
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_texture_image *stImage = st_texture_image(texImage);
DBG("%s\n", __FUNCTION__);
if (stImage->mt) {
- st_miptree_release(intel->pipe, &stImage->mt);
+ st_miptree_release(pipe, &stImage->mt);
}
if (texImage->Data) {
diff --git a/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c b/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
index c5aab96ea7..5b25b2a43b 100644
--- a/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/i915pipe/intel_tex_subimage.c
@@ -33,6 +33,7 @@
#include "intel_context.h"
#include "intel_tex.h"
+#include "state_tracker/st_context.h"
#include "state_tracker/st_mipmap_tree.h"
#include "pipe/p_context.h"
@@ -51,7 +52,7 @@ intelTexSubimage(GLcontext * ctx,
struct gl_texture_object *texObj,
struct gl_texture_image *texImage)
{
- struct intel_context *intel = intel_context(ctx);
+ struct pipe_context *pipe = ctx->st->pipe;
struct st_texture_image *intelImage = st_texture_image(texImage);
GLuint dstRowStride;
@@ -68,15 +69,17 @@ intelTexSubimage(GLcontext * ctx,
return;
if (intelImage->mt)
- intel->pipe->region_idle(intel->pipe, intelImage->mt->region);
+ pipe->region_idle(pipe, intelImage->mt->region);
+#if 0
LOCK_HARDWARE(intel);
+#endif
/* Map buffer if necessary. Need to lock to prevent other contexts
* from uploading the buffer under us.
*/
if (intelImage->mt)
- texImage->Data = st_miptree_image_map(intel->pipe,
+ texImage->Data = st_miptree_image_map(pipe,
intelImage->mt,
intelImage->face,
intelImage->level,
@@ -108,11 +111,13 @@ intelTexSubimage(GLcontext * ctx,
_mesa_unmap_teximage_pbo(ctx, packing);
if (intelImage->mt) {
- st_miptree_image_unmap(intel->pipe, intelImage->mt);
+ st_miptree_image_unmap(pipe, intelImage->mt);
texImage->Data = NULL;
}
+#if 0
UNLOCK_HARDWARE(intel);
+#endif
}