mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
include: Avoid bitfields in public structures.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
41ca2469b2
commit
bf227d4a28
@ -28,6 +28,8 @@
|
||||
|
||||
#define STATIC_ASSERT(e) extern void __VKD3D_STATIC_ASSERT__(int [(e) ? 1 : -1])
|
||||
|
||||
#define MEMBER_SIZE(t, m) sizeof(((t *)0)->m)
|
||||
|
||||
static inline size_t align(size_t addr, size_t alignment)
|
||||
{
|
||||
return (addr + (alignment - 1)) & ~(alignment - 1);
|
||||
|
@ -365,6 +365,7 @@ enum vkd3d_root_signature_version
|
||||
int vkd3d_shader_serialize_root_signature(const struct vkd3d_root_signature_desc *root_signature,
|
||||
enum vkd3d_root_signature_version version, struct vkd3d_shader_code *dxbc);
|
||||
|
||||
/* FIXME: Add support for 64 UAV bind slots. */
|
||||
#define VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS 8
|
||||
|
||||
struct vkd3d_shader_scan_info
|
||||
@ -372,9 +373,9 @@ struct vkd3d_shader_scan_info
|
||||
enum vkd3d_shader_structure_type type;
|
||||
void *next;
|
||||
|
||||
unsigned int uav_read_mask : VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS;
|
||||
unsigned int uav_counter_mask : VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS;
|
||||
unsigned int sampler_comparison_mode_mask;
|
||||
unsigned int uav_read_mask; /* VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS */
|
||||
unsigned int uav_counter_mask; /* VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS */
|
||||
unsigned int sampler_comparison_mode_mask; /* 16 */
|
||||
};
|
||||
|
||||
int vkd3d_shader_scan_dxbc(const struct vkd3d_shader_code *dxbc,
|
||||
|
@ -18,6 +18,9 @@
|
||||
|
||||
#include "vkd3d_shader_private.h"
|
||||
|
||||
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_counter_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
||||
STATIC_ASSERT(MEMBER_SIZE(struct vkd3d_shader_scan_info, uav_read_mask) * CHAR_BIT >= VKD3D_SHADER_MAX_UNORDERED_ACCESS_VIEWS);
|
||||
|
||||
struct vkd3d_shader_parser
|
||||
{
|
||||
struct vkd3d_shader_desc shader_desc;
|
||||
|
Loading…
Reference in New Issue
Block a user