[D3D12] Fix 16.16.16.16 vertex fetch

This commit is contained in:
Triang3l 2018-08-16 12:20:27 +03:00
parent c547851626
commit 8d2bfd4b88
1 changed files with 2 additions and 2 deletions

View File

@ -1048,7 +1048,7 @@ void HlslShaderTranslator::ProcessVertexFetchInstruction(
EmitSourceDepth("xe_pv.zw = float2(0.0, 1.0);\n");
break;
case VertexFormat::k_16_16_16_16:
EmitSourceDepth("xe_vertex_element = (xe_vertex_element.xxxx >>\n");
EmitSourceDepth("xe_vertex_element = (xe_vertex_element.xxyy >>\n");
EmitSourceDepth(" uint4(0u, 16u, 0u, 16u)) & 65535u;\n");
if (instr.attributes.is_signed) {
EmitSourceDepth(
@ -1073,7 +1073,7 @@ void HlslShaderTranslator::ProcessVertexFetchInstruction(
EmitSourceDepth("xe_pv.zw = float2(0.0, 1.0);\n");
break;
case VertexFormat::k_16_16_16_16_FLOAT:
EmitSourceDepth("xe_vertex_element = (xe_vertex_element.xxxx >>\n");
EmitSourceDepth("xe_vertex_element = (xe_vertex_element.xxyy >>\n");
EmitSourceDepth(" uint4(0u, 16u, 0u, 16u)) & 65535u;\n");
EmitSourceDepth("xe_pv = f16tof32(xe_vertex_element);\n");
break;