Skip to content

Refactor GL and VK blit.c code to a shared implementation #2671

@abaire

Description

@abaire

Bug Description

Currently xemu has two practically identical handlers for the 0x9F blit functionality:

https://github.com/xemu-project/xemu/blob/master/hw/xbox/nv2a/pgraph/gl/blit.c
https://github.com/xemu-project/xemu/blob/master/hw/xbox/nv2a/pgraph/vk/blit.c

The only difference are a couple of calls into the renderer to deal with surface retrieval. These calls have identical signatures and could be passed into a common implementation as function pointers.

Expected Behavior

To reduce maintenance burden, we should factor these into a single implementation in pgraph/blit.c (or similar). Eventually we may implement accelerated versions of the blits, but until that happens this will make it easier to maintain correctness between the renderers.

xemu Version

n/a

System Information

n/a

Additional Context

See https://github.com/xemu-project/xemu/pull/2666/changes/BASE..b95148b8a5353118b4e0dba394963fb1f228867e#r2692942400 and associated conversation between Matt & abaire on Discord

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions