mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
fix: upscale game buffers before native-resolution composition (#1367)
* fix: upscale game buffers before native-resolution composition * fix: drop an added code comment from the effects source draw * fix: effects source keeps pillarboxed games and near-full source rectangles * fix: a larger opaque draw above keeps the full composition path --------- Co-authored-by: maxjivi05 <maxjividen@gmail.com>
This commit is contained in:
1 parent
7c5bf77f17
commit
e879375ca4
6 files changed
+786
-19
No files matched your search
@@ -12,6 +12,31 @@ struct vk_api g_vk;
|
||||
|
||||
static unsigned views, sets, freed_views, freed_sets;
|
||||
static VkImageView bound_view;
|
||||
static VkImage target_image;
|
||||
static unsigned target_events, target_forgot_at, target_destroyed_at;
|
||||
|
||||
void blendp_forget_image(VkImage image) {
|
||||
assert(image == target_image && target_forgot_at == 0);
|
||||
target_forgot_at = ++target_events;
|
||||
}
|
||||
|
||||
static void VKAPI_CALL destroy_image(VkDevice dev, VkImage image, const VkAllocationCallbacks *alloc) {
|
||||
(void)dev; (void)alloc;
|
||||
assert(image == target_image && target_forgot_at > 0);
|
||||
target_destroyed_at = ++target_events;
|
||||
}
|
||||
|
||||
static void check_blend_cache_target_lifetime(void) {
|
||||
target_image = (VkImage)(uintptr_t)50;
|
||||
struct fx_target target = {.img = target_image};
|
||||
g_vk.DestroyImage = destroy_image;
|
||||
target_destroy(&target);
|
||||
assert(target_forgot_at == 1 && target_destroyed_at == 2);
|
||||
assert(target.img == VK_NULL_HANDLE);
|
||||
target_destroy(&target);
|
||||
assert(target_events == 2);
|
||||
}
|
||||
|
||||
static VkResult VKAPI_CALL create_view(VkDevice dev, const VkImageViewCreateInfo *info,
|
||||
const VkAllocationCallbacks *alloc, VkImageView *out) {
|
||||
(void)dev; (void)alloc;
|
||||
@@ -78,6 +103,7 @@ int main(int argc, char **argv) {
|
||||
assert(scene_ensure(source, 1920, 1080) == 0);
|
||||
assert(bound_view != original && views == 2 && freed_views == 1 && freed_sets == 1);
|
||||
}
|
||||
check_blend_cache_target_lifetime();
|
||||
puts("PASS");
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user