Ivan Belyavtsev
24.06.2022
PSO keeps a state of the rendering pipeline:
cbuffer ConstantBuffer: register(b0)
{
float4x4 mwpMatrix;
}
struct PSInput
{
float4 position : SV_POSITION;
float4 color : COLOR;
};
PSInput VSMain(float4 position : POSITION, float4 normal: NORMAL, float4 ambient : COLOR0, float4 diffuse : COLOR1, float4 emissive : COLOR2)
{
PSInput result;
result.position = mul(mwpMatrix, position);
result.color = ambient;
return result;
}
float4 PSMain(PSInput input) : SV_TARGET
{
return input.color;
}
Root signature links command lists to the resources the shaders require.
Descriptor table hold a range of descriptor heap which is going to be bound to the root signature [1]
Command queue allows to submit commands via command list and make the fence synchronization
ExecuteCommandLists
for submitting command listsSignal
for setting a special value to the fence [1]Command list a set of GPU command which will executed
Reset
transfers the command list to the record
stateClose
transfers the command list out of the record
state [1]A region of memory to keep a queue GPU commands.
Has one method Reset
, which allows to re-use the memory
for the next commands [1]
populate_command_list
methodrender
methodFence is an object of GPU-CPU synchronization [1]
wait_for_gpu
methodmove_to_next_frame
method