Re-upload pixels to GPU if they changed.
189{
191 return;
192 }
193
196 if (!variant) {
198 return;
199 }
200
203 }
204
206
210 }
211
213 if (!access) {
215 return;
216 }
217
219 loom.upload_data(
221 access->data_ptr,
222 access->byte_count,
224 } else {
225 loom.upload_data(
227 access->data_ptr,
228 access->byte_count);
229 }
230
232
234 "TextureProcessor: external variant data updated ({} bytes)", access->byte_count);
235 return;
236 }
237
240
242 rp->bind_texture(
245 }
246 }
247
249 if (pixel_data.empty()) {
250 return;
251 }
252
254
258 }
259
261 loom.upload_data(
263 pixel_data.data(),
264 pixel_data.size(),
266 } else {
267 loom.upload_data(
269 pixel_data.data(),
270 pixel_data.size());
271 }
272
274
276 "TextureProcessor: pixel data updated ({} bytes)", pixel_data.size());
277}
#define MF_DEBUG(comp, ctx,...)
std::shared_ptr< Core::VKImage > create_gpu_texture()
Create VKImage for texture storage.
virtual std::optional< Kakshya::DataVariant > get_variant_source()
PixelSource m_pixel_source
std::shared_ptr< TextureBuffer > m_texture_buffer
std::shared_ptr< Buffers::VKBuffer > m_stream_staging
Persistent host-visible staging buffer for streaming pixel uploads.
std::shared_ptr< VKBuffer > create_image_staging_buffer(size_t size)
Allocate a persistent host-visible staging buffer sized for repeated streaming uploads to an image of...
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
std::optional< TextureAccess > as_texture_access(const DataVariant &variant)
Extract a TextureAccess from a DataVariant.
MAYAFLUX_API TextureLoom & get_texture_manager()
Get the global texture manager instance.