[D3D12] Shaders (not all compiling yet)

This commit is contained in:
Triang3l
2018-07-24 14:57:21 +03:00
parent b0421de496
commit 87aecfa1b8
10 changed files with 671 additions and 59 deletions

View File

@@ -10,10 +10,14 @@
#ifndef XENIA_GPU_D3D12_D3D12_COMMAND_PROCESSOR_H_
#define XENIA_GPU_D3D12_D3D12_COMMAND_PROCESSOR_H_
#include <memory>
#include "xenia/gpu/command_processor.h"
#include "xenia/gpu/d3d12/d3d12_graphics_system.h"
#include "xenia/gpu/d3d12/pipeline_cache.h"
#include "xenia/gpu/xenos.h"
#include "xenia/kernel/kernel_state.h"
#include "xenia/ui/d3d12/d3d12_context.h"
namespace xe {
namespace gpu {
@@ -25,7 +29,14 @@ class D3D12CommandProcessor : public CommandProcessor {
kernel::KernelState* kernel_state);
~D3D12CommandProcessor();
private:
void ClearCaches() override;
// Needed by everything that owns transient objects.
xe::ui::d3d12::D3D12Context* GetD3D12Context() const {
return static_cast<xe::ui::d3d12::D3D12Context*>(context_.get());
}
protected:
bool SetupContext() override;
void ShutdownContext() override;
@@ -36,9 +47,19 @@ class D3D12CommandProcessor : public CommandProcessor {
const uint32_t* host_address,
uint32_t dword_count) override;
bool IssueDraw(PrimitiveType prim_type, uint32_t index_count,
bool IssueDraw(PrimitiveType primitive_type, uint32_t index_count,
IndexBufferInfo* index_buffer_info) override;
bool IssueCopy() override;
private:
void BeginFrame();
void EndFrame();
bool cache_clear_requested_ = false;
std::unique_ptr<PipelineCache> pipeline_cache_;
uint32_t current_queue_frame_ = UINT32_MAX;
};
} // namespace d3d12