summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/haiku-softpipe
diff options
context:
space:
mode:
authorAlexander von Gluck IV <[email protected]>2014-08-29 14:42:26 +0000
committerAlexander von Gluck IV <[email protected]>2014-08-30 19:35:24 -0400
commit15da8d076110c39d3ce34ac45edf0f3c9ab13b7f (patch)
treeeee3ab31602a599dd55b64b8eebb4cc48ad7b149 /src/gallium/targets/haiku-softpipe
parentc06afcede2a0cf214aadc7d4ea149b361ee56ad2 (diff)
st/hgl: Move st_manager create/destroy into hgl state_tracker
Diffstat (limited to 'src/gallium/targets/haiku-softpipe')
-rw-r--r--src/gallium/targets/haiku-softpipe/GalliumContext.cpp32
1 files changed, 4 insertions, 28 deletions
diff --git a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
index d7d5d9d731c..ed4171282d8 100644
--- a/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
+++ b/src/gallium/targets/haiku-softpipe/GalliumContext.cpp
@@ -69,23 +69,6 @@ hgl_viewport(struct gl_context* glContext)
}
-static int
-hook_stm_get_param(struct st_manager *smapi, enum st_manager_param param)
-{
- CALLED();
-
- switch (param) {
- case ST_MANAGER_BROKEN_INVALIDATE:
- TRACE("%s: TODO: How should we handle BROKEN_INVALIDATE calls?\n",
- __func__);
- // For now we force validation of the framebuffer.
- return 1;
- }
-
- return 0;
-}
-
-
GalliumContext::GalliumContext(ulong options)
:
fOptions(options),
@@ -264,12 +247,8 @@ GalliumContext::CreateContext(Bitmap *bitmap)
return -1;
}
- context->manager = CALLOC_STRUCT(st_manager);
- if (!context->manager) {
- ERROR("%s: Couldn't allocate Mesa state tracker manager!\n", __func__);
- return -1;
- }
- context->manager->get_param = hook_stm_get_param;
+ // Create state_tracker manager
+ context->manager = hgl_create_st_manager(fScreen);
// Create state tracker visual
context->stVisual = CreateVisual();
@@ -287,9 +266,6 @@ GalliumContext::CreateContext(Bitmap *bitmap)
return -1;
}
- // We need to assign the screen *before* calling st_api create_context
- context->manager->screen = fScreen;
-
// Build state tracker attributes
struct st_context_attribs attribs;
memset(&attribs, 0, sizeof(attribs));
@@ -405,7 +381,7 @@ GalliumContext::DestroyContext(context_id contextID)
FREE(fContext[contextID]->stVisual);
if (fContext[contextID]->manager)
- FREE(fContext[contextID]->manager);
+ hgl_destroy_st_manager(fContext[contextID]->manager);
FREE(fContext[contextID]);
}
@@ -523,7 +499,7 @@ GalliumContext::ResizeViewport(int32 width, int32 height)
if (fContext[i] && fContext[i]->st) {
struct st_context *stContext = (struct st_context*)fContext[i]->st;
_mesa_set_viewport(stContext->ctx, 0, 0, 0, width, height);
- st_manager_validate_framebuffers(stContext);
+ st_manager_validate_framebuffers(stContext);
}
}
}