mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-06 12:09:21 +00:00
nv2a: Use width to calculate swizzled surface pitch
This commit is contained in:
parent
66b57dca9c
commit
d399643d92
@ -5741,7 +5741,8 @@ static void pgraph_populate_surface_binding_entry_sized(NV2AState *d,
|
||||
entry->vram_addr = dma.address + surface->offset;
|
||||
entry->width = width;
|
||||
entry->height = height;
|
||||
entry->pitch = surface->pitch;
|
||||
entry->pitch = entry->swizzle ? (entry->width * entry->fmt.bytes_per_pixel)
|
||||
: surface->pitch;
|
||||
entry->size = height * surface->pitch;
|
||||
entry->upload_pending = true;
|
||||
entry->download_pending = false;
|
||||
@ -5751,6 +5752,8 @@ static void pgraph_populate_surface_binding_entry_sized(NV2AState *d,
|
||||
entry->frame_time = pg->frame_time;
|
||||
entry->draw_time = pg->draw_time;
|
||||
entry->cleared = false;
|
||||
|
||||
assert(entry->pitch >= (entry->width * entry->fmt.bytes_per_pixel));
|
||||
}
|
||||
|
||||
static void pgraph_populate_surface_binding_entry(NV2AState *d, bool color,
|
||||
|
Loading…
x
Reference in New Issue
Block a user