Fix more warnings

This commit is contained in:
twinaphex 2018-02-04 21:12:42 +01:00
parent 9dd33b9797
commit 028fc18294
4 changed files with 93 additions and 88 deletions

View File

@ -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 = {};
D3D10_SHADER_RESOURCE_VIEW_DESC view_desc = { DXGI_FORMAT_UNKNOWN };
view_desc.Format = texture->desc.Format;
view_desc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;
view_desc.Texture2D.MostDetailedMip = 0;
@ -134,7 +134,7 @@ void d3d10_update_texture(
texture->dirty = true;
}
DXGI_FORMAT
DXGI_FORMAT
d3d10_get_closest_match(D3D10Device device,
DXGI_FORMAT desired_format, UINT desired_format_support)
{

View File

@ -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 = {};
D3D11_SHADER_RESOURCE_VIEW_DESC view_desc = { DXGI_FORMAT_UNKNOWN };
view_desc.Format = texture->desc.Format;
view_desc.ViewDimension = D3D_SRV_DIMENSION_TEXTURE2D;
view_desc.Texture2D.MostDetailedMip = 0;
@ -149,7 +149,7 @@ void d3d11_update_texture(
D3D11GenerateMips(ctx, texture->view);
}
DXGI_FORMAT
DXGI_FORMAT
d3d11_get_closest_match(D3D11Device device, DXGI_FORMAT desired_format, UINT desired_format_support)
{
DXGI_FORMAT default_list[] = {desired_format, DXGI_FORMAT_UNKNOWN};

View File

@ -73,7 +73,7 @@ static void d3d10_update_viewport(void* data, bool force_full)
d3d10->resize_viewport = false;
}
static void*
static void*
d3d10_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
{
WNDCLASSEX wndclass = { 0 };
@ -179,17 +179,22 @@ d3d10_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
d3d10_gfx_set_rotation(d3d10, 0);
{
D3D10_SAMPLER_DESC desc = {};
unsigned k;
D3D10_SAMPLER_DESC desc;
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_POINT;
desc.AddressU = D3D10_TEXTURE_ADDRESS_BORDER;
desc.AddressV = D3D10_TEXTURE_ADDRESS_BORDER;
desc.AddressW = D3D10_TEXTURE_ADDRESS_BORDER;
desc.MipLODBias = 0.0f;
desc.MaxAnisotropy = 1;
desc.ComparisonFunc = D3D10_COMPARISON_NEVER;
desc.MinLOD = -D3D10_FLOAT32_MAX;
desc.MaxLOD = D3D10_FLOAT32_MAX;
for (k = 0; k < 4; k++)
desc.BorderColor[k] = 0.0f;
D3D10CreateSamplerState(d3d10->device, &desc, &d3d10->sampler_nearest);
desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;

View File

@ -399,7 +399,7 @@ static void d3d11_gfx_free(void* data)
free(d3d11);
}
static void*
static void*
d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
{
unsigned i;
@ -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 = {};
D3D11_RASTERIZER_DESC desc = {(D3D11_FILL_MODE)0};
desc.FillMode = D3D11_FILL_SOLID;
desc.CullMode = D3D11_CULL_NONE;