From 13cb8264d81f09ce046c73fd751596572d13512e Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Thu, 23 Apr 2009 12:57:46 +0100 Subject: gallium/intel/gem: Use softpipe rather than i915simple if INTEL_SOFTPIPE is set. --- src/gallium/drivers/softpipe/sp_texture.c | 19 +++++++++++++++++++ src/gallium/drivers/softpipe/sp_winsys.h | 6 ++++++ 2 files changed, 25 insertions(+) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_texture.c b/src/gallium/drivers/softpipe/sp_texture.c index c0113c47adb..9e19745889e 100644 --- a/src/gallium/drivers/softpipe/sp_texture.c +++ b/src/gallium/drivers/softpipe/sp_texture.c @@ -399,3 +399,22 @@ softpipe_init_screen_texture_funcs(struct pipe_screen *screen) screen->transfer_map = softpipe_transfer_map; screen->transfer_unmap = softpipe_transfer_unmap; } + + +boolean +softpipe_get_texture_buffer( struct pipe_texture *texture, + struct pipe_buffer **buf, + unsigned *stride ) +{ + struct softpipe_texture *tex = (struct softpipe_texture *)texture; + + if (!tex) + return FALSE; + + pipe_buffer_reference(buf, tex->buffer); + + if (stride) + *stride = tex->stride[0]; + + return TRUE; +} diff --git a/src/gallium/drivers/softpipe/sp_winsys.h b/src/gallium/drivers/softpipe/sp_winsys.h index cf91e7782bc..9e571862b75 100644 --- a/src/gallium/drivers/softpipe/sp_winsys.h +++ b/src/gallium/drivers/softpipe/sp_winsys.h @@ -52,6 +52,12 @@ struct pipe_screen * softpipe_create_screen(struct pipe_winsys *); +boolean +softpipe_get_texture_buffer( struct pipe_texture *texture, + struct pipe_buffer **buf, + unsigned *stride ); + + #ifdef __cplusplus } #endif -- cgit v1.2.3 From 46ddcbc1a9e70d5dba257e6421eb69ed942dd1da Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 28 Apr 2009 14:29:27 -0600 Subject: softpipe: return PIPE_UNREFERENCED in softpipe_is_buffer/texture_referenced() This allows the engine demo to run again (avoid crash in VBO code). This stuff still needs to be revisited someday though... --- src/gallium/drivers/softpipe/sp_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/softpipe') diff --git a/src/gallium/drivers/softpipe/sp_context.c b/src/gallium/drivers/softpipe/sp_context.c index 11aff814791..62e8d99cfd0 100644 --- a/src/gallium/drivers/softpipe/sp_context.c +++ b/src/gallium/drivers/softpipe/sp_context.c @@ -126,14 +126,14 @@ softpipe_is_texture_referenced( struct pipe_context *pipe, struct pipe_texture *texture, unsigned face, unsigned level) { - return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; + return PIPE_UNREFERENCED; } static unsigned int softpipe_is_buffer_referenced( struct pipe_context *pipe, struct pipe_buffer *buf) { - return PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE; + return PIPE_UNREFERENCED; } struct pipe_context * -- cgit v1.2.3