From b77e6eb8e60f9245722453a5abe07e09270a73ff Mon Sep 17 00:00:00 2001 From: Triang3l Date: Sun, 12 Sep 2021 17:12:33 +0300 Subject: [PATCH] [D3D12] Fix syntax warnings reported by Clang --- src/xenia/gpu/d3d12/d3d12_primitive_processor.cc | 2 +- src/xenia/gpu/d3d12/pipeline_cache.h | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc b/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc index c93275b95..ec1e576b0 100644 --- a/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc +++ b/src/xenia/gpu/d3d12/d3d12_primitive_processor.cc @@ -156,7 +156,7 @@ void* D3D12PrimitiveProcessor::RequestHostConvertedIndexBufferForCurrentFrame( (coalign_for_simd ? XE_GPU_PRIMITIVE_PROCESSOR_SIMD_SIZE : 0), index_size, nullptr, nullptr, &gpu_address); if (!mapping) { - return false; + return nullptr; } if (coalign_for_simd) { ptrdiff_t coalignment_offset = diff --git a/src/xenia/gpu/d3d12/pipeline_cache.h b/src/xenia/gpu/d3d12/pipeline_cache.h index b5d7a4209..290c47996 100644 --- a/src/xenia/gpu/d3d12/pipeline_cache.h +++ b/src/xenia/gpu/d3d12/pipeline_cache.h @@ -70,12 +70,11 @@ class PipelineCache { // Retrieves the shader modification for the current state. The shader must // have microcode analyzed. - DxbcShaderTranslator::Modification - PipelineCache::GetCurrentVertexShaderModification( + DxbcShaderTranslator::Modification GetCurrentVertexShaderModification( const Shader& shader, Shader::HostVertexShaderType host_vertex_shader_type) const; - DxbcShaderTranslator::Modification - PipelineCache::GetCurrentPixelShaderModification(const Shader& shader) const; + DxbcShaderTranslator::Modification GetCurrentPixelShaderModification( + const Shader& shader) const; // If draw_util::IsRasterizationPotentiallyDone is false, the pixel shader // MUST be made nullptr BEFORE calling this!