summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2013-03-21 19:51:30 +0100
committerMarek Olšák <[email protected]>2013-03-26 01:28:19 +0100
commite40c634bd210b53e8d8fb7e049f6efc7d0fe05cb (patch)
tree6d3726d615aa47a6efbfc0ed48f81fa7e7022258 /src/gallium/state_trackers
parentc91cf7d7d2c8cc377945c79be87799c31ce9ae59 (diff)
st/dri: integrate the HUD
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.c5
-rw-r--r--src/gallium/state_trackers/dri/common/dri_context.h2
-rw-r--r--src/gallium/state_trackers/dri/common/dri_drawable.c4
3 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index 4698feb54d8..49cd794c661 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -155,6 +155,7 @@ dri_create_context(gl_api api, const struct gl_config * visual,
if (ctx->st->cso_context) {
ctx->pp = pp_init(ctx->st->pipe, ctx->pp_enabled, ctx->st->cso_context);
+ ctx->hud = hud_create(ctx->st->pipe, ctx->st->cso_context);
}
*error = __DRI_CTX_ERROR_SUCCESS;
@@ -173,6 +174,10 @@ dri_destroy_context(__DRIcontext * cPriv)
{
struct dri_context *ctx = dri_context(cPriv);
+ if (ctx->hud) {
+ hud_destroy(ctx->hud);
+ }
+
/* note: we are freeing values and nothing more because
* driParseConfigFiles allocated values only - the rest
* is owned by screen optionCacheDefaults.
diff --git a/src/gallium/state_trackers/dri/common/dri_context.h b/src/gallium/state_trackers/dri/common/dri_context.h
index 484b756fc09..5af2861377a 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.h
+++ b/src/gallium/state_trackers/dri/common/dri_context.h
@@ -35,6 +35,7 @@
#include "dri_util.h"
#include "pipe/p_compiler.h"
#include "postprocess/filters.h"
+#include "hud/hud_context.h"
struct pipe_context;
struct pipe_fence;
@@ -59,6 +60,7 @@ struct dri_context
struct st_context_iface *st;
struct pp_queue_t *pp;
unsigned int pp_enabled[PP_FILTERS];
+ struct hud_context *hud;
};
static INLINE struct dri_context *
diff --git a/src/gallium/state_trackers/dri/common/dri_drawable.c b/src/gallium/state_trackers/dri/common/dri_drawable.c
index 87ab76467c7..00ae1daed8a 100644
--- a/src/gallium/state_trackers/dri/common/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/common/dri_drawable.c
@@ -443,6 +443,10 @@ dri_flush(__DRIcontext *cPriv,
}
dri_postprocessing(ctx, drawable, ST_ATTACHMENT_BACK_LEFT);
+
+ if (ctx->hud) {
+ hud_draw(ctx->hud, drawable->textures[ST_ATTACHMENT_BACK_LEFT]);
+ }
}
flush_flags = 0;