From 4dd3a22679ece7cb2daca518076ddab232126089 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 24 Jan 2018 00:38:11 +0100 Subject: [PATCH] (D3D12) Silence MSVC warnings --- gfx/common/d3d12_common.h | 8 ++++---- gfx/drivers/d3d12.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gfx/common/d3d12_common.h b/gfx/common/d3d12_common.h index b8a994938a..64b6eed7fc 100644 --- a/gfx/common/d3d12_common.h +++ b/gfx/common/d3d12_common.h @@ -1217,7 +1217,7 @@ void d3d12_upload_texture(D3D12GraphicsCommandList cmd, d3d12_texture_t* texture void d3d12_create_fullscreen_quad_vbo( D3D12Device device, D3D12_VERTEX_BUFFER_VIEW* view, D3D12Resource* vbo); -static inline d3d12_resource_transition(D3D12GraphicsCommandList cmd, D3D12Resource resource, +static inline void d3d12_resource_transition(D3D12GraphicsCommandList cmd, D3D12Resource resource, D3D12_RESOURCE_STATES state_before, D3D12_RESOURCE_STATES state_after) { D3D12_RESOURCE_BARRIER barrier = { @@ -1231,12 +1231,12 @@ static inline d3d12_resource_transition(D3D12GraphicsCommandList cmd, D3D12Resou D3D12ResourceBarrier(cmd, 1, &barrier); } -static inline d3d12_set_texture(D3D12GraphicsCommandList cmd, const d3d12_texture_t* texture) +static inline void d3d12_set_texture(D3D12GraphicsCommandList cmd, const d3d12_texture_t* texture) { D3D12SetGraphicsRootDescriptorTable(cmd, DESC_TABLE_INDEX_SRV_TEXTURE, texture->gpu_descriptor); } -static inline d3d12_set_sampler(D3D12GraphicsCommandList cmd, D3D12_GPU_DESCRIPTOR_HANDLE sampler) +static inline void d3d12_set_sampler(D3D12GraphicsCommandList cmd, D3D12_GPU_DESCRIPTOR_HANDLE sampler) { D3D12SetGraphicsRootDescriptorTable(cmd, DESC_TABLE_INDEX_SAMPLER, sampler); } @@ -1247,7 +1247,7 @@ static inline void d3d12_update_texture(int width, int height, int pitch, DXGI_F uint8_t* dst; D3D12_RANGE read_range = { 0, 0 }; - D3D12Map(texture->upload_buffer, 0, &read_range, &dst); + D3D12Map(texture->upload_buffer, 0, &read_range, (void**)&dst); dxgi_copy(width, height, format, pitch, data, texture->desc.Format, texture->layout.Footprint.RowPitch, dst + texture->layout.Offset); diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 39599e8f69..29a8c64db2 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -348,7 +348,7 @@ static void d3d12_set_menu_texture_frame( D3D12_RANGE read_range = { 0, 0 }; d3d12_vertex_t* v; - D3D12Map(d3d12->menu.vbo, 0, &read_range, &v); + D3D12Map(d3d12->menu.vbo, 0, &read_range, (void**)&v); v[0].color[3] = alpha; v[1].color[3] = alpha; v[2].color[3] = alpha;