From 1bea12c3087bf6716ee9749051ee8866bb2184ba Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 7 Jan 2023 21:04:43 -0800 Subject: til_fb: introduce til_fb_fragment_t.stream This adds an optional stream member and type for introducing some persistent potentially cross-fragment state bound to the logical frame being rendered to by the fragment. It's a preparatory commit for adding things like arbitrary stream-bound state modules can create/read/modify for passing non-pixel information between modules bound to the fragment's frame that may vary frame to frame, but may also only be updated occasionally within a stream while still being accessible by every frame for the lifetime of the stream. This may evolve to encompass the fragment's texture member, turning the texture into just another arbitrary thingy tied to the stream which modules/rendering primitives may lookup and make use of if present. This commit only adds the type and member though, no implementation yet. --- src/til_fb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/til_fb.h b/src/til_fb.h index 80ffeb4..48113d7 100644 --- a/src/til_fb.h +++ b/src/til_fb.h @@ -9,6 +9,7 @@ #include "til_setup.h" #include "til_util.h" +typedef struct til_stream_t til_stream_t; typedef struct til_fb_fragment_t til_fb_fragment_t; typedef struct til_fb_fragment_ops_t til_fb_fragment_ops_t; @@ -21,6 +22,7 @@ typedef struct til_fb_fragment_ops_t til_fb_fragment_ops_t; typedef struct til_fb_fragment_t { const til_fb_fragment_ops_t *ops; /* optional opaque ops for physical fragments, NULL for strictly logical fragments */ + til_stream_t *stream; /* optional stream of continuity this fragment participates in */ til_fb_fragment_t *texture; /* optional source texture when drawing to this fragment */ uint32_t *buf; /* pointer to the first pixel in the fragment */ unsigned x, y; /* absolute coordinates of the upper left corner of this fragment */ -- cgit v1.2.3