vkd3d: Move is_power_of_two to common header.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
This commit is contained in:
parent
830f9642b5
commit
fe13c017ea
|
@ -210,6 +210,11 @@ static inline LONG InterlockedDecrement(LONG volatile *x)
|
|||
# define atomic_load_acquire(ptr) atomic_add_fetch(ptr, 0)
|
||||
#endif
|
||||
|
||||
static inline bool is_power_of_two(unsigned int x)
|
||||
{
|
||||
return x && !(x & (x -1));
|
||||
}
|
||||
|
||||
static inline void vkd3d_parse_version(const char *version, int *major, int *minor)
|
||||
{
|
||||
*major = atoi(version);
|
||||
|
|
|
@ -580,11 +580,6 @@ bool is_write_resource_state(D3D12_RESOURCE_STATES state)
|
|||
| D3D12_RESOURCE_STATE_RESOLVE_DEST);
|
||||
}
|
||||
|
||||
static bool is_power_of_two(unsigned int x)
|
||||
{
|
||||
return x && !(x & (x -1));
|
||||
}
|
||||
|
||||
bool is_valid_resource_state(D3D12_RESOURCE_STATES state)
|
||||
{
|
||||
const D3D12_RESOURCE_STATES valid_states =
|
||||
|
|
Loading…
Reference in New Issue