Silence some CXX_BUILD warnings

This commit is contained in:
twinaphex 2018-03-29 15:27:30 +02:00
parent 4372db491a
commit ef5830b233
2 changed files with 13 additions and 12 deletions

View File

@ -372,18 +372,18 @@ bool d3d12_init_descriptors(d3d12_video_t* d3d12)
cs_root_params[CS_ROOT_ID_TEXTURE_T].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; cs_root_params[CS_ROOT_ID_TEXTURE_T].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
cs_root_params[CS_ROOT_ID_TEXTURE_T].DescriptorTable.NumDescriptorRanges = countof(srv_tbl); cs_root_params[CS_ROOT_ID_TEXTURE_T].DescriptorTable.NumDescriptorRanges = countof(srv_tbl);
cs_root_params[CS_ROOT_ID_TEXTURE_T].DescriptorTable.pDescriptorRanges = srv_tbl; cs_root_params[CS_ROOT_ID_TEXTURE_T].DescriptorTable.pDescriptorRanges = srv_tbl;
cs_root_params[CS_ROOT_ID_TEXTURE_T].ShaderVisibility = 0; cs_root_params[CS_ROOT_ID_TEXTURE_T].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
cs_root_params[CS_ROOT_ID_UAV_T].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE; cs_root_params[CS_ROOT_ID_UAV_T].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
cs_root_params[CS_ROOT_ID_UAV_T].DescriptorTable.NumDescriptorRanges = countof(uav_tbl); cs_root_params[CS_ROOT_ID_UAV_T].DescriptorTable.NumDescriptorRanges = countof(uav_tbl);
cs_root_params[CS_ROOT_ID_UAV_T].DescriptorTable.pDescriptorRanges = uav_tbl; cs_root_params[CS_ROOT_ID_UAV_T].DescriptorTable.pDescriptorRanges = uav_tbl;
cs_root_params[CS_ROOT_ID_UAV_T].ShaderVisibility = 0; cs_root_params[CS_ROOT_ID_UAV_T].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
cs_root_params[CS_ROOT_ID_CONSTANTS].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS; cs_root_params[CS_ROOT_ID_CONSTANTS].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.Num32BitValues = 3; cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.Num32BitValues = 3;
cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.RegisterSpace = 0; cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.RegisterSpace = 0;
cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.ShaderRegister = 0; cs_root_params[CS_ROOT_ID_CONSTANTS].Constants.ShaderRegister = 0;
cs_root_params[CS_ROOT_ID_CONSTANTS].ShaderVisibility = 0; cs_root_params[CS_ROOT_ID_CONSTANTS].ShaderVisibility = D3D12_SHADER_VISIBILITY_ALL;
static_sampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP; static_sampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;
static_sampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP; static_sampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_CLAMP;

View File

@ -1303,14 +1303,15 @@ static bool d3d12_gfx_frame(
d3d12->desc.srv_heap.cpu.ptr + d3d12->desc.srv_heap.cpu.ptr +
texture_sem->binding * d3d12->desc.srv_heap.stride texture_sem->binding * d3d12->desc.srv_heap.stride
}; };
d3d12_texture_t* tex = texture_sem->texture_data; d3d12_texture_t* tex = (d3d12_texture_t*)texture_sem->texture_data;
D3D12_SHADER_RESOURCE_VIEW_DESC desc = { tex->desc.Format }; D3D12_SHADER_RESOURCE_VIEW_DESC desc = { tex->desc.Format };
desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING; desc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D; desc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
desc.Texture2D.MipLevels = tex->desc.MipLevels; desc.Texture2D.MipLevels = tex->desc.MipLevels;
D3D12CreateShaderResourceView(d3d12->device, tex->handle, &desc, handle); D3D12CreateShaderResourceView(d3d12->device,
tex->handle, &desc, handle);
} }
{ {
@ -1669,7 +1670,7 @@ static void d3d12_gfx_set_osd_msg(
if (d3d12) if (d3d12)
{ {
if (d3d12->sprites.enabled) if (d3d12->sprites.enabled)
font_driver_render_msg(video_info, font, msg, params); font_driver_render_msg(video_info, font, msg, (const font_params*)params);
else else
printf("OSD msg: %s\n", msg); printf("OSD msg: %s\n", msg);
} }