3 #include "renderer/commands/command_context.h" 4 #include "renderer/pipeline_state.h" 68 void BeginQuery(ID3D12QueryHeap* query_heap, D3D12_QUERY_TYPE type, UINT heap_index);
76 void EndQuery(ID3D12QueryHeap* query_heap, D3D12_QUERY_TYPE type, UINT heap_index);
87 void ResolveQueryData(ID3D12QueryHeap* query_heap, D3D12_QUERY_TYPE type, UINT start_index, UINT num_queries, ID3D12Resource* dest_buffer, UINT64 dest_buffer_offset);
145 void SetViewport(FLOAT x, FLOAT y, FLOAT w, FLOAT h, FLOAT min_depth = 0.0f, FLOAT max_depth = 1.0f);
160 void SetScissor(UINT left, UINT top, UINT right, UINT bottom);
208 void SetConstants(UINT root_index, UINT num_constants,
const void* constants);
293 void SetVertexBuffers(UINT start_slot, UINT count,
const D3D12_VERTEX_BUFFER_VIEW vbvs[]);
300 void Draw(UINT vertex_count, UINT vertex_start_offset = 0);
308 void DrawIndexed(UINT index_count, UINT start_index_location = 0, INT base_vertex_location = 0);
317 void DrawInstanced(UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location = 0, UINT start_instance_location = 0);
327 void DrawIndexedInstanced(UINT index_count_per_instance, UINT instance_count, UINT start_index_location, INT start_vertex_location, UINT start_instance_location);
void BeginQuery(ID3D12QueryHeap *query_heap, D3D12_QUERY_TYPE type, UINT heap_index)
Begins a query.
Definition: graphics_context.cc:61
void ClearColor(ColorBuffer &target)
Clears a RTV resource.
Definition: graphics_context.cc:33
void SetPrimitiveTopology(D3D12_PRIMITIVE_TOPOLOGY topology)
Sets the primitive topology.
Definition: graphics_context.cc:181
void SetScissor(const D3D12_RECT &rect)
Sets the current scissor rect.
Definition: graphics_context.cc:137
Wrapper around D3D12 command lists.
Definition: command_context.h:77
void SetRootSignature(const RootSignature &root_signature)
Sets the pipeline's root signature.
Definition: graphics_context.cc:79
void SetDepthStencilTarget(UINT dsv)
Sets a depth stencil.
Definition: graphics_context.h:128
Wrapper for DepthBuffer-like resources.
Definition: depth_buffer.h:14
void SetBufferSRV(UINT root_index, GpuBuffer &srv, UINT offset=0)
Binds a root SRV buffer to the pipeline.
Definition: graphics_context.cc:241
void SetViewport(const D3D12_VIEWPORT &vp)
Sets the current viewport.
Definition: graphics_context.cc:117
void SetVertexBuffers(UINT start_slot, UINT count, const D3D12_VERTEX_BUFFER_VIEW vbvs[])
Binds a number of vertex buffers to the pipeline.
Definition: graphics_context.cc:271
void SetStencilRef(UINT stencil_ref)
Sets the stencil reference value.
Definition: graphics_context.cc:169
void ResolveQueryData(ID3D12QueryHeap *query_heap, D3D12_QUERY_TYPE type, UINT start_index, UINT num_queries, ID3D12Resource *dest_buffer, UINT64 dest_buffer_offset)
Resolves a query.
Definition: graphics_context.cc:73
Buffer-type for buffers with color data in them.
Definition: color_buffer.h:14
void DrawIndexed(UINT index_count, UINT start_index_location=0, INT base_vertex_location=0)
Issues an non-instanced indexed draw call.
Definition: graphics_context.cc:283
void DrawIndexedInstanced(UINT index_count_per_instance, UINT instance_count, UINT start_index_location, INT start_vertex_location, UINT start_instance_location)
Issues an instanced indexed draw call.
Definition: graphics_context.cc:296
void SetVertexBuffer(UINT slot, const D3D12_VERTEX_BUFFER_VIEW &vbv)
Binds a vertex buffer to the pipeline.
Definition: graphics_context.cc:265
void SetRenderTarget(UINT rtv, UINT dsv)
Sets a render target and depth stencil.
Definition: graphics_context.h:121
void DrawInstanced(UINT vertex_count_per_instance, UINT instance_count, UINT start_vertex_location=0, UINT start_instance_location=0)
Issues an instanced non-indexed draw call.
Definition: graphics_context.cc:289
Wraps the PipelineStateObject for graphics pipelines.
Definition: pipeline_state.h:61
void ClearUAV(GpuBuffer &target)
Clears a UAV resource.
Definition: graphics_context.cc:16
static GraphicsContext & Begin(const eastl::wstring &name=L"")
Begins a new GraphicsContext.
Definition: graphics_context.cc:10
void ClearDepthAndStencil(DepthBuffer &target)
Clears a DSV resource.
Definition: graphics_context.cc:54
Wraps the ID3D12RootSignature object.
Definition: root_signature.h:121
void SetViewportAndScissor(const D3D12_VIEWPORT &vp, const D3D12_RECT &rect)
Sets the current viewport and scissor rect.
Definition: graphics_context.cc:155
void SetConstantBuffer(UINT root_index, D3D12_GPU_VIRTUAL_ADDRESS cbv)
Sets a root constant buffer.
Definition: graphics_context.cc:235
Wraps buffer-type GpuResource's.
Definition: gpu_buffer.h:17
void SetPipelineState(const GraphicsPSO &pso)
Sets the pipeline state.
Definition: graphics_context.cc:187
void SetBufferUAV(UINT root_index, GpuBuffer &uav, UINT offset=0)
Binds a root UAV buffer to the pipeline.
Definition: graphics_context.cc:247
void SetRenderTargets(UINT num_rtvs, const UINT rtvs[])
Sets a number of render targets.
Definition: graphics_context.cc:89
void EndQuery(ID3D12QueryHeap *query_heap, D3D12_QUERY_TYPE type, UINT heap_index)
Ends a query.
Definition: graphics_context.cc:67
Wraps functionality for submitting graphics related command lists.
Definition: graphics_context.h:16
The main Blowbox namespace.
Definition: image.cc:8
void SetRenderTarget(UINT rtv)
Sets a render target.
Definition: graphics_context.h:114
void DrawIndirect(GpuBuffer &argument_buffer, UINT argument_buffer_offset=0)
Issues an indirect draw buffer.
Definition: graphics_context.cc:303
void SetBlendFactor(float colorRGBA[])
Sets the blend factor.
Definition: graphics_context.cc:175
Represents a 32 bit parameter, which can either be a float, uint or int.
Definition: command_context.h:20
void SetIndexBuffer(const D3D12_INDEX_BUFFER_VIEW &ibv)
Binds an index buffer to the pipeline.
Definition: graphics_context.cc:259
void ClearStencil(DepthBuffer &target)
Clears a DSV resource.
Definition: graphics_context.cc:47
void SetConstants(UINT root_index, UINT num_constants, const void *constants)
Sets a number of root constants.
Definition: graphics_context.cc:199
void Draw(UINT vertex_count, UINT vertex_start_offset=0)
Issues a non-instanced non-indexed draw call.
Definition: graphics_context.cc:277
void ClearDepth(DepthBuffer &target)
Clears a DSV resource.
Definition: graphics_context.cc:40
void SetDescriptorTable(UINT root_index, D3D12_GPU_DESCRIPTOR_HANDLE first_handle)
Bind a descriptortable to the pipeline.
Definition: graphics_context.cc:253