summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/dd.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2005-05-23 12:17:27 +0000
committerKeith Whitwell <[email protected]>2005-05-23 12:17:27 +0000
commit17bcf9f816db3098db42acd7f0672f64554dd6a0 (patch)
treeafda81fcab4e5f6812a4a8aef7ba602f16e563c7 /src/mesa/main/dd.h
parenteb9d6f44a963d985d67991deff57a6f8d7d3f0f6 (diff)
Import Thomas Helstrom's SSE memcpy code from the via X.org driver.
Add a TextureMemCpy callback, called from texstore.c when copying texture data via the memcpy_texture() path. Enable this code in the via driver - 100% speedup in texdown.c results.
Diffstat (limited to 'src/mesa/main/dd.h')
-rw-r--r--src/mesa/main/dd.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 3746e4685c7..e1f3ad54529 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -515,6 +515,19 @@ struct dd_function_table {
void (*FreeTexImageData)( GLcontext *ctx, struct gl_texture_image *tImage );
/**
+ * Note: no context argument. This function doesn't initially look
+ * like it belongs here, except that the driver is the only entity
+ * that knows for sure how the texture memory is allocated - via
+ * the above callbacks. There is then an argument that the driver
+ * knows what memcpy paths might be fast. Typically this is invoked with
+ *
+ * to -- a pointer into texture memory allocated by NewTextureImage() above.
+ * from -- a pointer into client memory or a mesa temporary.
+ * sz -- nr bytes to copy.
+ */
+ void (*TextureMemCpy)( void *to, const void *from, size_t sz );
+
+ /**
* Called by glAreTextureResident().
*/
GLboolean (*IsTextureResident)( GLcontext *ctx,