diff options
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_texture.h')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_texture.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_texture.h b/src/gallium/drivers/softpipe/sp_texture.h index 533d6252e25..96609f43489 100644 --- a/src/gallium/drivers/softpipe/sp_texture.h +++ b/src/gallium/drivers/softpipe/sp_texture.h @@ -93,6 +93,22 @@ softpipe_transfer(struct pipe_transfer *pt) } +/** + * Return pointer to a resource's actual data. + * This is a short-cut instead of using map()/unmap(), which should + * probably be fixed. + */ +static INLINE void * +softpipe_resource_data(struct pipe_resource *pt) +{ + if (!pt) + return NULL; + + assert(softpipe_resource(pt)->dt == NULL); + return softpipe_resource(pt)->data; +} + + extern void softpipe_init_screen_texture_funcs(struct pipe_screen *screen); |