[SPIR-V] Handle 32-bit normalized unsigned formats

This commit is contained in:
DrChat 2018-02-20 16:25:37 -06:00
parent b3de604f9e
commit 2a908eb86d
1 changed files with 24 additions and 3 deletions

View File

@ -1395,7 +1395,14 @@ void SpirvShaderTranslator::ProcessVertexFetchInstruction(
vertex_data);
}
} else {
// TODO(DrChat)
if (instr.attributes.is_signed) {
// TODO(DrChat): This is gonna be harder to convert. There's not
// enough precision in a float to shove INT_MAX into it.
assert_always();
components[i] = b.makeFloatConstant(0.f);
} else {
components[i] = ConvertNormVar(vertex_data, uint_type_, 32, false);
}
}
}
@ -1423,7 +1430,14 @@ void SpirvShaderTranslator::ProcessVertexFetchInstruction(
vertex_data);
}
} else {
// TODO(DrChat)
if (instr.attributes.is_signed) {
// TODO(DrChat): This is gonna be harder to convert. There's not
// enough precision in a float to shove INT_MAX into it.
assert_always();
components[i] = b.makeFloatConstant(0.f);
} else {
components[i] = ConvertNormVar(vertex_data, uint_type_, 32, false);
}
}
}
@ -1451,7 +1465,14 @@ void SpirvShaderTranslator::ProcessVertexFetchInstruction(
vertex_data);
}
} else {
// TODO(DrChat)
if (instr.attributes.is_signed) {
// TODO(DrChat): This is gonna be harder to convert. There's not
// enough precision in a float to shove INT_MAX into it.
assert_always();
components[i] = b.makeFloatConstant(0.f);
} else {
components[i] = ConvertNormVar(vertex_data, uint_type_, 32, false);
}
}
}