[D3D12] DXT1 untiling

This commit is contained in:
Triang3l
2018-08-06 20:10:53 +03:00
parent 265d6eb9df
commit cfd3821b83
10 changed files with 625 additions and 103 deletions

View File

@@ -435,6 +435,13 @@ void D3D12CommandProcessor::ReleaseScratchGPUBuffer(
}
}
void D3D12CommandProcessor::SetPipeline(ID3D12PipelineState* pipeline) {
if (current_pipeline_ != pipeline) {
GetCurrentCommandList()->SetPipelineState(pipeline);
current_pipeline_ = pipeline;
}
}
bool D3D12CommandProcessor::SetupContext() {
if (!CommandProcessor::SetupContext()) {
XELOGE("Failed to initialize base command processor context");
@@ -475,6 +482,10 @@ bool D3D12CommandProcessor::SetupContext() {
texture_cache_ = std::make_unique<TextureCache>(this, register_file_,
shared_memory_.get());
if (!texture_cache_->Initialize()) {
XELOGE("Failed to initialize texture cache");
return false;
}
return true;
}
@@ -653,7 +664,7 @@ bool D3D12CommandProcessor::IssueDraw(PrimitiveType primitive_type,
}
bool new_frame = BeginFrame();
ID3D12GraphicsCommandList* command_list = GetCurrentCommandList();
auto command_list = GetCurrentCommandList();
// Set the primitive topology.
D3D_PRIMITIVE_TOPOLOGY primitive_topology;
@@ -698,10 +709,7 @@ bool D3D12CommandProcessor::IssueDraw(PrimitiveType primitive_type,
UpdateFixedFunctionState(command_list);
// Bind the pipeline.
if (current_pipeline_ != pipeline) {
current_pipeline_ = pipeline;
command_list->SetPipelineState(pipeline);
}
SetPipeline(pipeline);
// Update system constants before uploading them.
UpdateSystemConstantValues(indexed ? index_buffer_info->endianness