diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-01-07 21:04:43 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-01-07 21:41:25 -0800 |
commit | 1bea12c3087bf6716ee9749051ee8866bb2184ba (patch) | |
tree | 0c2154de69e6a4375ae153d285a686117ec0a614 | |
parent | e78790651b5cd061bce1214790748ff51d3e62fe (diff) |
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.
-rw-r--r-- | src/til_fb.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 */ |