mirror of https://github.com/xemu-project/xemu.git
nv2a: Fix handling of NV097_SET_VERTEX_DATA4S_M
This commit is contained in:
parent
057e7fcfa1
commit
01c2f0fa74
hw/xbox/nv2a
|
@ -3099,14 +3099,11 @@ DEF_METHOD(NV097, SET_VERTEX_DATA4S_M)
|
|||
int slot = (method - NV097_SET_VERTEX_DATA4S_M) / 4;
|
||||
unsigned int part = slot % 2;
|
||||
slot /= 2;
|
||||
assert(false); /* FIXME: Untested! */
|
||||
VertexAttribute *attribute = &pg->vertex_attributes[slot];
|
||||
pgraph_allocate_inline_buffer_vertices(pg, slot);
|
||||
/* FIXME: Is mapping to [-1,+1] correct? */
|
||||
attribute->inline_value[part * 2 + 0] = ((int16_t)(parameter & 0xFFFF)
|
||||
* 2.0 + 1) / 65535.0;
|
||||
attribute->inline_value[part * 2 + 1] = ((int16_t)(parameter >> 16)
|
||||
* 2.0 + 1) / 65535.0;
|
||||
|
||||
attribute->inline_value[part * 2 + 0] = (float)(int16_t)(parameter & 0xFFFF);
|
||||
attribute->inline_value[part * 2 + 1] = (float)(int16_t)(parameter >> 16);
|
||||
if ((slot == 0) && (part == 1)) {
|
||||
pgraph_finish_inline_buffer_vertex(pg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue