mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
(D3D) Silence CXX_BUILD warnings
This commit is contained in:
parent
5483f5fc39
commit
2b4890220a
@ -84,7 +84,7 @@ void d3d10_init_texture(D3D10Device device, d3d10_texture_t* texture)
|
||||
D3D10CreateTexture2D(device, &texture->desc, NULL, &texture->handle);
|
||||
|
||||
{
|
||||
D3D10_SHADER_RESOURCE_VIEW_DESC view_desc = { 0 };
|
||||
D3D10_SHADER_RESOURCE_VIEW_DESC view_desc = {};
|
||||
view_desc.Format = texture->desc.Format;
|
||||
view_desc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;
|
||||
view_desc.Texture2D.MostDetailedMip = 0;
|
||||
|
@ -95,7 +95,7 @@ void d3d11_init_texture(D3D11Device device, d3d11_texture_t* texture)
|
||||
D3D11CreateTexture2D(device, &texture->desc, NULL, &texture->handle);
|
||||
|
||||
{
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC view_desc = { 0 };
|
||||
D3D11_SHADER_RESOURCE_VIEW_DESC view_desc = {};
|
||||
view_desc.Format = texture->desc.Format;
|
||||
view_desc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;
|
||||
view_desc.Texture2D.MostDetailedMip = 0;
|
||||
@ -190,11 +190,11 @@ bool d3d11_init_shader(
|
||||
|
||||
if (!src) /* LPCWSTR filename */
|
||||
{
|
||||
if (vs_entry && !d3d_compile_from_file(src_name, vs_entry, "vs_5_0", &vs_code))
|
||||
if (vs_entry && !d3d_compile_from_file((LPCWSTR)src_name, vs_entry, "vs_5_0", &vs_code))
|
||||
success = false;
|
||||
if (ps_entry && !d3d_compile_from_file(src_name, ps_entry, "ps_5_0", &ps_code))
|
||||
if (ps_entry && !d3d_compile_from_file((LPCWSTR)src_name, ps_entry, "ps_5_0", &ps_code))
|
||||
success = false;
|
||||
if (gs_entry && !d3d_compile_from_file(src_name, gs_entry, "gs_5_0", &gs_code))
|
||||
if (gs_entry && !d3d_compile_from_file((LPCWSTR)src_name, gs_entry, "gs_5_0", &gs_code))
|
||||
success = false;
|
||||
}
|
||||
else /* char array */
|
||||
@ -202,11 +202,11 @@ bool d3d11_init_shader(
|
||||
if (!size)
|
||||
size = strlen(src);
|
||||
|
||||
if (vs_entry && !d3d_compile(src, size, src_name, vs_entry, "vs_5_0", &vs_code))
|
||||
if (vs_entry && !d3d_compile(src, size, (LPCSTR)src_name, vs_entry, "vs_5_0", &vs_code))
|
||||
success = false;
|
||||
if (ps_entry && !d3d_compile(src, size, src_name, ps_entry, "ps_5_0", &ps_code))
|
||||
if (ps_entry && !d3d_compile(src, size, (LPCSTR)src_name, ps_entry, "ps_5_0", &ps_code))
|
||||
success = false;
|
||||
if (gs_entry && !d3d_compile(src, size, src_name, gs_entry, "gs_5_0", &gs_code))
|
||||
if (gs_entry && !d3d_compile(src, size, (LPCSTR)src_name, gs_entry, "gs_5_0", &gs_code))
|
||||
success = false;
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ typedef ID3D12InfoQueue* D3D12InfoQueue;
|
||||
|
||||
static INLINE ULONG D3D12Release(void* object)
|
||||
{
|
||||
return ((ID3D12Object*)object)->lpVtbl->Release(object);
|
||||
return ((ID3D12Object*)object)->lpVtbl->Release((ID3D12Object*)object);
|
||||
}
|
||||
static INLINE ULONG D3D12ReleaseDeviceChild(D3D12DeviceChild device_child)
|
||||
{
|
||||
@ -96,20 +96,20 @@ static INLINE ULONG D3D12ReleasePageable(D3D12Pageable pageable)
|
||||
static INLINE ULONG D3D12ReleaseHeap(D3D12Heap heap) { return heap->lpVtbl->Release(heap); }
|
||||
static INLINE ULONG D3D12ReleaseResource(void* resource)
|
||||
{
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->Release(resource);
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->Release((ID3D12Resource*)resource);
|
||||
}
|
||||
static INLINE HRESULT
|
||||
D3D12Map(void* resource, UINT subresource, D3D12_RANGE* read_range, void** data)
|
||||
{
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->Map(resource, subresource, read_range, data);
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->Map((ID3D12Resource*)resource, subresource, read_range, data);
|
||||
}
|
||||
static INLINE void D3D12Unmap(void* resource, UINT subresource, D3D12_RANGE* written_range)
|
||||
{
|
||||
((ID3D12Resource*)resource)->lpVtbl->Unmap(resource, subresource, written_range);
|
||||
((ID3D12Resource*)resource)->lpVtbl->Unmap((ID3D12Resource*)resource, subresource, written_range);
|
||||
}
|
||||
static INLINE D3D12_GPU_VIRTUAL_ADDRESS D3D12GetGPUVirtualAddress(void* resource)
|
||||
{
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->GetGPUVirtualAddress(resource);
|
||||
return ((ID3D12Resource*)resource)->lpVtbl->GetGPUVirtualAddress((ID3D12Resource*)resource);
|
||||
}
|
||||
static INLINE HRESULT D3D12WriteToSubresource(
|
||||
void* resource,
|
||||
@ -121,7 +121,7 @@ static INLINE HRESULT D3D12WriteToSubresource(
|
||||
{
|
||||
return ((ID3D12Resource*)resource)
|
||||
->lpVtbl->WriteToSubresource(
|
||||
resource, dst_subresource, dst_box, src_data, src_row_pitch, src_depth_pitch);
|
||||
(ID3D12Resource*)resource, dst_subresource, dst_box, src_data, src_row_pitch, src_depth_pitch);
|
||||
}
|
||||
static INLINE HRESULT D3D12ReadFromSubresource(
|
||||
void* resource,
|
||||
@ -133,13 +133,13 @@ static INLINE HRESULT D3D12ReadFromSubresource(
|
||||
{
|
||||
return ((ID3D12Resource*)resource)
|
||||
->lpVtbl->ReadFromSubresource(
|
||||
resource, dst_data, dst_row_pitch, dst_depth_pitch, src_subresource, src_box);
|
||||
(ID3D12Resource*)resource, dst_data, dst_row_pitch, dst_depth_pitch, src_subresource, src_box);
|
||||
}
|
||||
static INLINE HRESULT D3D12GetHeapProperties(
|
||||
void* resource, D3D12_HEAP_PROPERTIES* heap_properties, D3D12_HEAP_FLAGS* heap_flags)
|
||||
{
|
||||
return ((ID3D12Resource*)resource)
|
||||
->lpVtbl->GetHeapProperties(resource, heap_properties, heap_flags);
|
||||
->lpVtbl->GetHeapProperties((ID3D12Resource*)resource, heap_properties, heap_flags);
|
||||
}
|
||||
static INLINE ULONG D3D12ReleaseCommandAllocator(D3D12CommandAllocator command_allocator)
|
||||
{
|
||||
@ -1408,7 +1408,7 @@ static INLINE void d3d12_resource_transition(
|
||||
D3D12_RESOURCE_STATES state_before,
|
||||
D3D12_RESOURCE_STATES state_after)
|
||||
{
|
||||
D3D12_RESOURCE_BARRIER barrier = { 0 };
|
||||
D3D12_RESOURCE_BARRIER barrier = {};
|
||||
barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
|
||||
barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
|
||||
barrier.Transition.pResource = resource;
|
||||
|
@ -253,7 +253,7 @@
|
||||
static INLINE ULONG Release(void* object)
|
||||
{
|
||||
if (object)
|
||||
return ((IUnknown*)object)->lpVtbl->Release(object);
|
||||
return ((IUnknown*)object)->lpVtbl->Release((IUnknown*)object);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -285,19 +285,19 @@ static INLINE ULONG DXGIReleaseDeviceSubObject(DXGIDeviceSubObject device_sub_ob
|
||||
}
|
||||
static INLINE HRESULT DXGIGetSharedHandle(void* resource, HANDLE* shared_handle)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetSharedHandle(resource, shared_handle);
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetSharedHandle((IDXGIResource*)resource, shared_handle);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetUsage(void* resource, DXGI_USAGE* usage)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetUsage(resource, usage);
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetUsage((IDXGIResource*)resource, usage);
|
||||
}
|
||||
static INLINE HRESULT DXGISetEvictionPriority(void* resource, UINT eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->SetEvictionPriority(resource, eviction_priority);
|
||||
return ((IDXGIResource*)resource)->lpVtbl->SetEvictionPriority((IDXGIResource*)resource, eviction_priority);
|
||||
}
|
||||
static INLINE HRESULT DXGIGetEvictionPriority(void* resource, UINT* eviction_priority)
|
||||
{
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetEvictionPriority(resource, eviction_priority);
|
||||
return ((IDXGIResource*)resource)->lpVtbl->GetEvictionPriority((IDXGIResource*)resource, eviction_priority);
|
||||
}
|
||||
static INLINE ULONG DXGIReleaseKeyedMutex(DXGIKeyedMutex keyed_mutex)
|
||||
{
|
||||
|
@ -301,7 +301,7 @@ static bool d3d10_gfx_frame(
|
||||
D3D10Texture2D backBuffer;
|
||||
|
||||
Release(d3d10->renderTargetView);
|
||||
DXGIResizeBuffers(d3d10->swapChain, 0, 0, 0, 0, 0);
|
||||
DXGIResizeBuffers(d3d10->swapChain, 0, 0, 0, (DXGI_FORMAT)0, 0);
|
||||
|
||||
DXGIGetSwapChainBufferD3D10(d3d10->swapChain, 0, &backBuffer);
|
||||
D3D10CreateTexture2DRenderTargetView(
|
||||
|
@ -167,7 +167,7 @@ static bool d3d11_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
if (!conf)
|
||||
return false;
|
||||
|
||||
d3d11->shader_preset = calloc(1, sizeof(*d3d11->shader_preset));
|
||||
d3d11->shader_preset = (struct video_shader*)calloc(1, sizeof(*d3d11->shader_preset));
|
||||
|
||||
if (!video_shader_read_conf_cgp(conf, d3d11->shader_preset))
|
||||
goto error;
|
||||
@ -715,7 +715,7 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
D3D11CreateBlendState(d3d11->device, &blend_desc, &d3d11->blend_disable);
|
||||
}
|
||||
{
|
||||
D3D11_RASTERIZER_DESC desc = { 0 };
|
||||
D3D11_RASTERIZER_DESC desc = {};
|
||||
|
||||
desc.FillMode = D3D11_FILL_SOLID;
|
||||
desc.CullMode = D3D11_CULL_NONE;
|
||||
|
@ -179,7 +179,7 @@ static bool d3d12_gfx_frame(
|
||||
for (i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
Release(d3d12->chain.renderTargets[i]);
|
||||
|
||||
DXGIResizeBuffers(d3d12->chain.handle, 0, 0, 0, 0, 0);
|
||||
DXGIResizeBuffers(d3d12->chain.handle, 0, 0, 0, (DXGI_FORMAT)0, 0);
|
||||
|
||||
for (i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
{
|
||||
@ -399,7 +399,7 @@ static void d3d12_set_menu_texture_frame(
|
||||
{
|
||||
d3d12_video_t* d3d12 = (d3d12_video_t*)data;
|
||||
int pitch = width * (rgb32 ? sizeof(uint32_t) : sizeof(uint16_t));
|
||||
DXGI_FORMAT format = rgb32 ? DXGI_FORMAT_B8G8R8A8_UNORM : DXGI_FORMAT_EX_A4R4G4B4_UNORM;
|
||||
DXGI_FORMAT format = rgb32 ? DXGI_FORMAT_B8G8R8A8_UNORM : (DXGI_FORMAT)DXGI_FORMAT_EX_A4R4G4B4_UNORM;
|
||||
|
||||
if (d3d12->menu.texture.desc.Width != width || d3d12->menu.texture.desc.Height != height)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user