[Mesa-dev] [PATCH 05/12] cso: add cso_get_pipe_context
Marek Olšák
maraeo at gmail.com
Tue Nov 21 17:46:05 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/auxiliary/cso_cache/cso_context.c | 4 ++++
src/gallium/auxiliary/cso_cache/cso_context.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 757bcf3..df5543c 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -121,20 +121,24 @@ struct cso_context {
boolean render_condition_cond, render_condition_cond_saved;
struct pipe_framebuffer_state fb, fb_saved;
struct pipe_viewport_state vp, vp_saved;
struct pipe_blend_color blend_color;
unsigned sample_mask, sample_mask_saved;
unsigned min_samples, min_samples_saved;
struct pipe_stencil_ref stencil_ref, stencil_ref_saved;
};
+struct pipe_context *cso_get_pipe_context(struct cso_context *cso)
+{
+ return cso->pipe;
+}
static boolean delete_blend_state(struct cso_context *ctx, void *state)
{
struct cso_blend *cso = (struct cso_blend *)state;
if (ctx->blend == cso->data)
return FALSE;
if (cso->delete_state)
cso->delete_state(cso->context, cso->data);
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index 190d0dc..b1bc081 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -37,20 +37,21 @@
#ifdef __cplusplus
extern "C" {
#endif
struct cso_context;
struct u_vbuf;
struct cso_context *cso_create_context(struct pipe_context *pipe,
unsigned u_vbuf_flags);
void cso_destroy_context( struct cso_context *cso );
+struct pipe_context *cso_get_pipe_context(struct cso_context *cso);
enum pipe_error cso_set_blend( struct cso_context *cso,
const struct pipe_blend_state *blend );
enum pipe_error cso_set_depth_stencil_alpha( struct cso_context *cso,
const struct pipe_depth_stencil_alpha_state *dsa );
--
2.7.4
More information about the mesa-dev
mailing list