[Legacy Vulkan] Add Vulkan prefix to Pipeline/TextureCache to avoid future name collisions

This commit is contained in:
Triang3l
2022-05-11 21:21:33 +03:00
parent e6fb9883d2
commit af3158f1bf
6 changed files with 125 additions and 112 deletions

View File

@@ -95,8 +95,8 @@ bool VulkanCommandProcessor::SetupContext() {
return false;
}
texture_cache_ = std::make_unique<TextureCache>(memory_, register_file_,
&trace_writer_, provider);
texture_cache_ = std::make_unique<VulkanTextureCache>(
memory_, register_file_, &trace_writer_, provider);
status = texture_cache_->Initialize();
if (status != VK_SUCCESS) {
XELOGE("Unable to initialize texture cache");
@@ -104,7 +104,8 @@ bool VulkanCommandProcessor::SetupContext() {
return false;
}
pipeline_cache_ = std::make_unique<PipelineCache>(register_file_, provider);
pipeline_cache_ =
std::make_unique<VulkanPipelineCache>(register_file_, provider);
status = pipeline_cache_->Initialize(
buffer_cache_->constant_descriptor_set_layout(),
texture_cache_->texture_descriptor_set_layout(),
@@ -714,9 +715,9 @@ bool VulkanCommandProcessor::IssueDraw(xenos::PrimitiveType primitive_type,
auto pipeline_status = pipeline_cache_->ConfigurePipeline(
command_buffer, current_render_state_, vertex_shader, pixel_shader,
primitive_type, &pipeline);
if (pipeline_status == PipelineCache::UpdateStatus::kError) {
if (pipeline_status == VulkanPipelineCache::UpdateStatus::kError) {
return false;
} else if (pipeline_status == PipelineCache::UpdateStatus::kMismatch ||
} else if (pipeline_status == VulkanPipelineCache::UpdateStatus::kMismatch ||
full_update) {
dfn.vkCmdBindPipeline(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS,
pipeline);