mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-21 03:45:39 -04:00
GPUDevice: Add GPUDownloadTexture
Which can also be based in host/client memory. Use it for screenshots and VRAM downloads.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "align.h"
|
||||
#include "types.h"
|
||||
|
||||
#include <type_traits>
|
||||
@ -27,6 +28,16 @@
|
||||
#include <malloc.h> // alloca
|
||||
#endif
|
||||
|
||||
/// Only currently using 128-bit vectors at max.
|
||||
static constexpr u32 VECTOR_ALIGNMENT = 16;
|
||||
|
||||
/// Aligns allocation/pitch size to preferred host size.
|
||||
template<typename T>
|
||||
ALWAYS_INLINE static T VectorAlign(T value)
|
||||
{
|
||||
return Common::AlignUpPow2(value, VECTOR_ALIGNMENT);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
ALWAYS_INLINE_RELEASE static void MemsetPtrs(T* ptr, T value, u32 count)
|
||||
{
|
||||
|
Reference in New Issue
Block a user