vertexjit: Remove unused ReadUV() cases.
This commit is contained in:
parent
f2d5d668a5
commit
470d2f0f4e
2 changed files with 5 additions and 30 deletions
|
@ -1265,6 +1265,7 @@ void VertexDecoder::SetVertexType(u32 fmt, const VertexDecoderOptions &options,
|
|||
}
|
||||
|
||||
_assert_msg_(decFmt.posfmt == DEC_FLOAT_3, "Reader only supports float pos");
|
||||
_assert_msg_(decFmt.uvfmt == DEC_FLOAT_2 || decFmt.uvfmt == DEC_NONE, "Reader only supports float UV");
|
||||
|
||||
// Attempt to JIT as well. But only do that if the main CPU JIT is enabled, in order to aid
|
||||
// debugging attempts - if the main JIT doesn't work, this one won't do any better, probably.
|
||||
|
|
|
@ -171,36 +171,10 @@ public:
|
|||
}
|
||||
|
||||
void ReadUV(float uv[2]) const {
|
||||
switch (decFmt_.uvfmt) {
|
||||
case DEC_U8_2:
|
||||
{
|
||||
const u8 *b = (const u8 *)(data_ + decFmt_.uvoff);
|
||||
uv[0] = b[0] * (1.f / 128.f);
|
||||
uv[1] = b[1] * (1.f / 128.f);
|
||||
}
|
||||
break;
|
||||
|
||||
case DEC_U16_2:
|
||||
{
|
||||
const u16 *s = (const u16 *)(data_ + decFmt_.uvoff);
|
||||
uv[0] = s[0] * (1.f / 32768.f);
|
||||
uv[1] = s[1] * (1.f / 32768.f);
|
||||
}
|
||||
break;
|
||||
|
||||
case DEC_FLOAT_2:
|
||||
{
|
||||
const float *f = (const float *)(data_ + decFmt_.uvoff);
|
||||
uv[0] = f[0];
|
||||
uv[1] = f[1];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ERROR_LOG_REPORT_ONCE(fmtuv, G3D, "Reader: Unsupported UV Format %d", decFmt_.uvfmt);
|
||||
memset(uv, 0, sizeof(float) * 2);
|
||||
break;
|
||||
}
|
||||
// Only DEC_FLOAT_2 is supported.
|
||||
const float *f = (const float *)(data_ + decFmt_.uvoff);
|
||||
uv[0] = f[0];
|
||||
uv[1] = f[1];
|
||||
}
|
||||
|
||||
void ReadColor0(float color[4]) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue