Closed veeenu closed 8 months ago
For dx11 and dx12, uploadbuffer RowPitch must be aligned to 256 bytes (64 pixels). Might also fix this to support images with arbitrary width.
That's an unrelated issue -- could you please open a new one so we can track that separately?
I did some experiments early today, but on an old version 799032ba from Jan, when there was only DX12 renderer.
I split create_texture_inner
into create_texture_inner
+ upload_texture_inner
, then added replace_image
to RenderEngine.
Here is the quick (and dirty) patch file for future reference. I haven't written any raw DX12 before, so there might be some bugs. split_create_texture_and_upload_texture.patch on 799032ba
When I have some more spare time, I will take a look at renderers of other APIs.
That's a good starting point, thank you!
Currently, a texture can only be loaded once via
RenderEngine::load_image
and its contents cannot be changed.A public
RenderEngine::replace_image
method should be created to make this happen.