diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-03-16 12:57:36 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-03-16 13:01:11 -0400 |
| commit | 75f5fcdfee4cd643aa347ea69db05c595ed39caf (patch) | |
| tree | 840fcdbc69b82dd947b7f4549c01be5146e19c26 /Source/Core/VideoBackends | |
| parent | 328585ef17386f3a27cae86c2863ede5a28971ef (diff) | |
Assert: Remove unused parameter from DEBUG_ASSERT
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
Diffstat (limited to 'Source/Core/VideoBackends')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/D3DUtil.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/D3D/DXShader.cpp | 8 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/D3D/DXTexture.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/OGLTexture.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/OGL/Render.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKPipeline.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/VKTexture.cpp | 10 |
10 files changed, 24 insertions, 28 deletions
diff --git a/Source/Core/VideoBackends/D3D/D3DUtil.cpp b/Source/Core/VideoBackends/D3D/D3DUtil.cpp index e0a473be83..317b6c4b2f 100644 --- a/Source/Core/VideoBackends/D3D/D3DUtil.cpp +++ b/Source/Core/VideoBackends/D3D/D3DUtil.cpp @@ -62,7 +62,7 @@ public: int BeginAppendData(void** write_ptr, unsigned int size, unsigned int vertex_size) { - DEBUG_ASSERT(VIDEO, size < max_size); + DEBUG_ASSERT(size < max_size); D3D11_MAPPED_SUBRESOURCE map; unsigned int aligned_offset = Common::AlignUp(offset, vertex_size); diff --git a/Source/Core/VideoBackends/D3D/DXShader.cpp b/Source/Core/VideoBackends/D3D/DXShader.cpp index bba5188575..588cd2b631 100644 --- a/Source/Core/VideoBackends/D3D/DXShader.cpp +++ b/Source/Core/VideoBackends/D3D/DXShader.cpp @@ -43,25 +43,25 @@ D3DBlob* DXShader::GetByteCode() const ID3D11VertexShader* DXShader::GetD3DVertexShader() const { - DEBUG_ASSERT(VIDEO, m_stage == ShaderStage::Vertex); + DEBUG_ASSERT(m_stage == ShaderStage::Vertex); return static_cast<ID3D11VertexShader*>(m_shader); } ID3D11GeometryShader* DXShader::GetD3DGeometryShader() const { - DEBUG_ASSERT(VIDEO, m_stage == ShaderStage::Geometry); + DEBUG_ASSERT(m_stage == ShaderStage::Geometry); return static_cast<ID3D11GeometryShader*>(m_shader); } ID3D11PixelShader* DXShader::GetD3DPixelShader() const { - DEBUG_ASSERT(VIDEO, m_stage == ShaderStage::Pixel); + DEBUG_ASSERT(m_stage == ShaderStage::Pixel); return static_cast<ID3D11PixelShader*>(m_shader); } ID3D11ComputeShader* DXShader::GetD3DComputeShader() const { - DEBUG_ASSERT(VIDEO, m_stage == ShaderStage::Compute); + DEBUG_ASSERT(m_stage == ShaderStage::Compute); return static_cast<ID3D11ComputeShader*>(m_shader); } diff --git a/Source/Core/VideoBackends/D3D/DXTexture.cpp b/Source/Core/VideoBackends/D3D/DXTexture.cpp index 4953c0c3a7..f899f62f0e 100644 --- a/Source/Core/VideoBackends/D3D/DXTexture.cpp +++ b/Source/Core/VideoBackends/D3D/DXTexture.cpp @@ -193,11 +193,10 @@ void DXTexture::ResolveFromTexture(const AbstractTexture* src, const MathUtil::R u32 layer, u32 level) { const DXTexture* srcentry = static_cast<const DXTexture*>(src); - DEBUG_ASSERT(VIDEO, m_config.samples > 1 && m_config.width == srcentry->m_config.width && - m_config.height == srcentry->m_config.height && m_config.samples == 1); - DEBUG_ASSERT(VIDEO, - rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && - rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); + DEBUG_ASSERT(m_config.samples > 1 && m_config.width == srcentry->m_config.width && + m_config.height == srcentry->m_config.height && m_config.samples == 1); + DEBUG_ASSERT(rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && + rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); D3D::context->ResolveSubresource( m_texture->GetTex(), D3D11CalcSubresource(level, layer, m_config.levels), diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index d8eac0ff18..85e81f8171 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -270,7 +270,7 @@ std::unique_ptr<AbstractPipeline> Renderer::CreatePipeline(const AbstractPipelin void Renderer::UpdateUtilityUniformBuffer(const void* uniforms, u32 uniforms_size) { - DEBUG_ASSERT(VIDEO, uniforms_size > 0 && uniforms_size < UTILITY_UBO_SIZE); + DEBUG_ASSERT(uniforms_size > 0 && uniforms_size < UTILITY_UBO_SIZE); D3D11_MAPPED_SUBRESOURCE mapped; HRESULT hr = D3D::context->Map(m_utility_uniform_buffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped); CHECK(SUCCEEDED(hr), "Map utility UBO"); @@ -323,7 +323,7 @@ void Renderer::DrawUtilityPipeline(const void* uniforms, u32 uniforms_size, cons if (vertices_ptr) { vertices_this_draw = std::min(vertices_this_draw, UTILITY_VBO_SIZE / vertex_stride); - DEBUG_ASSERT(VIDEO, vertices_this_draw > 0); + DEBUG_ASSERT(vertices_this_draw > 0); UpdateUtilityVertexBuffer(vertices_ptr, vertex_stride, vertices_this_draw); D3D::stateman->SetVertexBuffer(m_utility_vertex_buffer, vertex_stride, 0); } diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp index bf77db0f6d..4ce9aa398c 100644 --- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp +++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp @@ -279,11 +279,10 @@ void OGLTexture::ResolveFromTexture(const AbstractTexture* src, const MathUtil::Rectangle<int>& rect, u32 layer, u32 level) { const OGLTexture* srcentry = static_cast<const OGLTexture*>(src); - DEBUG_ASSERT(VIDEO, m_config.samples > 1 && m_config.width == srcentry->m_config.width && - m_config.height == srcentry->m_config.height && m_config.samples == 1); - DEBUG_ASSERT(VIDEO, - rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && - rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); + DEBUG_ASSERT(m_config.samples > 1 && m_config.width == srcentry->m_config.width && + m_config.height == srcentry->m_config.height && m_config.samples == 1); + DEBUG_ASSERT(rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && + rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); BlitFramebuffer(const_cast<OGLTexture*>(srcentry), rect, layer, level, rect, layer, level); } @@ -655,7 +654,7 @@ std::unique_ptr<OGLFramebuffer> OGLFramebuffer::Create(const OGLTexture* color_a } } - DEBUG_ASSERT(VIDEO, glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE); + DEBUG_ASSERT(glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE); FramebufferManager::SetFramebuffer(0); return std::make_unique<OGLFramebuffer>(color_format, depth_format, width, height, layers, samples, fbo); diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 0990f01fb6..2d284ae4ef 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -507,7 +507,7 @@ void ProgramShaderCache::Shutdown() s_last_VAO = 0; // All pipeline programs should have been released. - DEBUG_ASSERT(VIDEO, s_pipeline_programs.empty()); + DEBUG_ASSERT(s_pipeline_programs.empty()); s_pipeline_programs.clear(); } diff --git a/Source/Core/VideoBackends/OGL/Render.cpp b/Source/Core/VideoBackends/OGL/Render.cpp index 9d640661a0..ab30fe288a 100644 --- a/Source/Core/VideoBackends/OGL/Render.cpp +++ b/Source/Core/VideoBackends/OGL/Render.cpp @@ -1690,7 +1690,7 @@ void Renderer::DrawUtilityPipeline(const void* uniforms, u32 uniforms_size, cons void Renderer::UploadUtilityUniforms(const void* uniforms, u32 uniforms_size) { - DEBUG_ASSERT(VIDEO, uniforms_size > 0); + DEBUG_ASSERT(uniforms_size > 0); auto buf = ProgramShaderCache::GetUniformBuffer()->Map( uniforms_size, ProgramShaderCache::GetUniformBufferAlignment()); diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index 13bd72ff2a..c69ad396d6 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -1123,7 +1123,7 @@ void Renderer::SetTexture(u32 index, const AbstractTexture* texture) // Texture should always be in SHADER_READ_ONLY layout prior to use. // This is so we don't need to transition during render passes. auto* tex = texture ? static_cast<const VKTexture*>(texture)->GetRawTexIdentifier() : nullptr; - DEBUG_ASSERT(VIDEO, !tex || tex->GetLayout() == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); + DEBUG_ASSERT(!tex || tex->GetLayout() == VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL); StateTracker::GetInstance()->SetTexture(index, tex ? tex->GetView() : VK_NULL_HANDLE); } diff --git a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp index 31dcc72a6a..fa513cef7d 100644 --- a/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKPipeline.cpp @@ -27,7 +27,7 @@ VKPipeline::~VKPipeline() std::unique_ptr<VKPipeline> VKPipeline::Create(const AbstractPipelineConfig& config) { - DEBUG_ASSERT(VIDEO, config.vertex_shader && config.pixel_shader); + DEBUG_ASSERT(config.vertex_shader && config.pixel_shader); // Get render pass for config. VkRenderPass render_pass = g_object_cache->GetRenderPass( diff --git a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp index cd09bf6dd5..a62238e8a2 100644 --- a/Source/Core/VideoBackends/Vulkan/VKTexture.cpp +++ b/Source/Core/VideoBackends/Vulkan/VKTexture.cpp @@ -216,12 +216,10 @@ void VKTexture::ResolveFromTexture(const AbstractTexture* src, const MathUtil::R u32 layer, u32 level) { const VKTexture* srcentry = static_cast<const VKTexture*>(src); - DEBUG_ASSERT(VIDEO, m_config.samples == 1 && m_config.width == srcentry->m_config.width && - m_config.height == srcentry->m_config.height && - srcentry->m_config.samples > 1); - DEBUG_ASSERT(VIDEO, - rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && - rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); + DEBUG_ASSERT(m_config.samples == 1 && m_config.width == srcentry->m_config.width && + m_config.height == srcentry->m_config.height && srcentry->m_config.samples > 1); + DEBUG_ASSERT(rect.left + rect.GetWidth() <= static_cast<int>(srcentry->m_config.width) && + rect.top + rect.GetHeight() <= static_cast<int>(srcentry->m_config.height)); // Resolving is considered to be a transfer operation. StateTracker::GetInstance()->EndRenderPass(); |
