summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_context.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-09 16:45:00 +0200
committerMarek Olšák <[email protected]>2017-04-20 20:11:35 +0200
commit1fb5bc83f19cc87767f902b99e77b330258a69dd (patch)
tree93b07fe772684f7bc5f4b456a9672abb2e5e1421 /src/mesa/state_tracker/st_context.h
parent69423dcf232a2cb6c9672ce95f684afa1d3842d2 (diff)
st/mesa: put the bitmap_cache structure inside st_context
This is nicer on caches, and the next commit will need to access the structure from a different place. Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_context.h')
-rw-r--r--src/mesa/state_tracker/st_context.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_context.h b/src/mesa/state_tracker/st_context.h
index dfee9275657..74ab43cfe9c 100644
--- a/src/mesa/state_tracker/st_context.h
+++ b/src/mesa/state_tracker/st_context.h
@@ -40,7 +40,6 @@ extern "C" {
#endif
-struct bitmap_cache;
struct dd_function_table;
struct draw_context;
struct draw_stage;
@@ -59,6 +58,26 @@ struct st_util_vertex
float s, t;
};
+struct st_bitmap_cache
+{
+ /** Window pos to render the cached image */
+ GLint xpos, ypos;
+ /** Bounds of region used in window coords */
+ GLint xmin, ymin, xmax, ymax;
+
+ GLfloat color[4];
+
+ /** Bitmap's Z position */
+ GLfloat zpos;
+
+ struct pipe_resource *texture;
+ struct pipe_transfer *trans;
+
+ GLboolean empty;
+
+ /** An I8 texture image: */
+ ubyte *buffer;
+};
struct st_context
{
@@ -180,7 +199,7 @@ struct st_context
struct pipe_sampler_state atlas_sampler;
enum pipe_format tex_format;
void *vs;
- struct bitmap_cache *cache;
+ struct st_bitmap_cache cache;
} bitmap;
/** for glDraw/CopyPixels */