mirror of https://gitlab.freedesktop.org/mesa/mesa
nvk: Add an NVK_MAX_SAMPLES #define
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29276>
This commit is contained in:
parent
ce0efbd175
commit
6f0292f6b0
|
@ -31,6 +31,8 @@ struct nvk_sample_location {
|
|||
uint8_t x_u4:4;
|
||||
uint8_t y_u4:4;
|
||||
};
|
||||
static_assert(sizeof(struct nvk_sample_location) == 1,
|
||||
"This struct has no holes");
|
||||
|
||||
/** Root descriptor table. This gets pushed to the GPU directly */
|
||||
struct nvk_root_descriptor_table {
|
||||
|
@ -42,7 +44,7 @@ struct nvk_root_descriptor_table {
|
|||
uint32_t base_instance;
|
||||
uint32_t draw_id;
|
||||
uint32_t view_index;
|
||||
struct nvk_sample_location sample_locations[8];
|
||||
struct nvk_sample_location sample_locations[NVK_MAX_SAMPLES];
|
||||
} draw;
|
||||
struct {
|
||||
uint32_t base_group[3];
|
||||
|
|
|
@ -639,6 +639,8 @@ nvk_get_device_properties(const struct nvk_instance *instance,
|
|||
VK_SAMPLE_COUNT_4_BIT |
|
||||
VK_SAMPLE_COUNT_8_BIT;
|
||||
|
||||
assert(sample_counts <= (NVK_MAX_SAMPLES << 1) - 1);
|
||||
|
||||
uint64_t os_page_size = 4096;
|
||||
os_get_page_size(&os_page_size);
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#define NVK_MAX_PUSH_SIZE 128
|
||||
#define NVK_MAX_DYNAMIC_BUFFERS 64
|
||||
#define NVK_MAX_RTS 8
|
||||
#define NVK_MAX_SAMPLES 8
|
||||
#define NVK_MIN_SSBO_ALIGNMENT 16
|
||||
#define NVK_MIN_TEXEL_BUFFER_ALIGNMENT 16
|
||||
#define NVK_MIN_UBO_ALIGNMENT 64
|
||||
|
|
Loading…
Reference in New Issue