From a25c2fd6b5cef3473123b101501f0d2b7767e707 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 9 Jul 2017 17:54:26 -0400 Subject: [PATCH] Got more explicit about what the thinking is here re: multiple sources of action. --- Outputs/CRT/Internals/TextureBuilder.hpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Outputs/CRT/Internals/TextureBuilder.hpp b/Outputs/CRT/Internals/TextureBuilder.hpp index 44f79dce0..bf2da997d 100644 --- a/Outputs/CRT/Internals/TextureBuilder.hpp +++ b/Outputs/CRT/Internals/TextureBuilder.hpp @@ -25,7 +25,11 @@ namespace CRT { with runs of data, ensuring each run is neighboured immediately to the left and right by copies of its first and last pixels. - Intended usage: + Although this class is not itself inherently thread safe, it is built to permit one serialised stream + of calls to provide source data, with an interceding (but also serialised) submission to the GPU at any time. + + + Intended usage by the data generator: (i) allocate a write area with allocate_write_area, supplying a maximum size. (ii) call reduce_previous_allocation_to to announce the actual size written. @@ -46,9 +50,13 @@ namespace CRT { an opportunity to correlate the data with whatever else it is being tied to. It will continue to sit in the CPU's memory space but has now passed beyond any further modification or reporting. - (v) call submit to move data to the GPU and free up its CPU-side resources. - The data is now on the GPU, for whatever use the caller desires. + Intended usage by the GPU owner: + + (i) call submit to move data to the GPU and free up its CPU-side resources. + + The latest data is now on the GPU, regardless of where the data provider may be in its process — only data + that has entered the submission queue is uploaded. */ class TextureBuilder {