Advertisement

D3D Textures

Started by April 10, 2020 02:11 PM
13 comments, last by Calin 4 years, 9 months ago

You can interrogate the Layout. Load a texture to a resource with a gradient. Every pixel will have a unique value. Then read it in its messed up presentation, compare it to the original and compute a lookup table.

This will allow you to move data between different layouts. It is automatized, and driver agnostic.

(In case of a GPU integrated inside the CPU, most probably the data is in the same place, so you should be able to read a single pixel from the GPU memory with no extra cost. But I don't know how to do it(in case it is possible). Here a place you can start investigating from, if you need it - https://stackoverflow.com/questions/56771653/how-memory-is-mapped-to-gpu-opencl-intel-graphics )

@nikito that`s probably DX 10/11 workflow. I`m not using DX 11 but most often what you don`t use helps you understand what you do use.

started with DirectX 8

interesting… [notes it down]

My project`s facebook page is “DreamLand Page”

Advertisement

@Calin I use Dx12. Moving data between different layouts is not the standard workflow.
But yes, you can do it.
If you need to program something very specific, you can do it.

@nikito cool

I got stuck at locking and reading data from a surface.

My project`s facebook page is “DreamLand Page”

This topic is closed to new replies.

Advertisement