summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_context.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2012-05-11 23:09:05 +0200
committerMarek Olšák <maraeo@gmail.com>2012-05-12 00:50:52 +0200
commit8a963d122d4b67209214b0483084ba950814f42b (patch)
tree560cbeeedf9128060c6ef23854c09c90b1c1df60 /src/gallium/drivers/r300/r300_context.c
parentf808984f438b827afff6fdbe52ac52dee8781d03 (diff)
r300g/swtcl: don't do stuff which is only for HWTCL
Diffstat (limited to 'src/gallium/drivers/r300/r300_context.c')
-rw-r--r--src/gallium/drivers/r300/r300_context.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/r300/r300_context.c b/src/gallium/drivers/r300/r300_context.c
index 1006336d44e..8cbe246f787 100644
--- a/src/gallium/drivers/r300/r300_context.c
+++ b/src/gallium/drivers/r300/r300_context.c
@@ -80,7 +80,8 @@ static void r300_destroy_context(struct pipe_context* context)
if (r300->draw)
draw_destroy(r300->draw);
- u_upload_destroy(r300->uploader);
+ if (r300->uploader)
+ u_upload_destroy(r300->uploader);
/* XXX: This function assumes r300->query_list was initialized */
r300_release_referenced_objects(r300);
@@ -402,8 +403,10 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
r300->context.create_video_decoder = vl_create_decoder;
r300->context.create_video_buffer = vl_video_buffer_create;
- r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
- PIPE_BIND_INDEX_BUFFER);
+ if (r300screen->caps.has_tcl) {
+ r300->uploader = u_upload_create(&r300->context, 256 * 1024, 4,
+ PIPE_BIND_INDEX_BUFFER);
+ }
r300->blitter = util_blitter_create(&r300->context);
if (r300->blitter == NULL)
@@ -437,7 +440,7 @@ struct pipe_context* r300_create_context(struct pipe_screen* screen,
pipe_resource_reference(&tex, NULL);
}
- {
+ if (r300screen->caps.has_tcl) {
struct pipe_resource vb;
memset(&vb, 0, sizeof(vb));
vb.target = PIPE_BUFFER;