summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2008-07-04 19:23:52 +0200
committerJakob Bornecrantz <[email protected]>2008-07-04 19:33:40 +0200
commite6c24539c3d482271a8c1bcba697b08e24344e05 (patch)
tree5b822aac0268a64f3b457d1ce68638d077a9b7a6 /src
parentf6e8963bb152166c28dae896a0c8c83ce554f987 (diff)
i915: Added debug filling code of texture, not active
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/i915simple/i915_texture.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915simple/i915_texture.c b/src/gallium/drivers/i915simple/i915_texture.c
index 5d6769924c3..cf4964b26b3 100644
--- a/src/gallium/drivers/i915simple/i915_texture.c
+++ b/src/gallium/drivers/i915simple/i915_texture.c
@@ -581,6 +581,7 @@ i915_texture_create(struct pipe_screen *screen,
struct i915_screen *i915screen = i915_screen(screen);
struct pipe_winsys *ws = screen->winsys;
struct i915_texture *tex = CALLOC_STRUCT(i915_texture);
+ size_t tex_size;
if (!tex)
return NULL;
@@ -600,14 +601,22 @@ i915_texture_create(struct pipe_screen *screen,
goto fail;
}
+ tex_size = tex->stride * tex->total_nblocksy;
+
tex->buffer = ws->buffer_create(ws, 64,
PIPE_BUFFER_USAGE_PIXEL,
- tex->stride *
- tex->total_nblocksy);
+ tex_size);
if (!tex->buffer)
goto fail;
+#if 0
+ void *ptr = ws->buffer_map(ws, tex->buffer,
+ PIPE_BUFFER_USAGE_CPU_WRITE);
+ memset(ptr, 0x80, tex_size);
+ ws->buffer_unmap(ws, tex->buffer);
+#endif
+
return &tex->base;
fail: