mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 20:20:18 +01:00
pvr: move static_asserts to source-files
This avoids needless dependencies on HW-defs in header files. Reviewed-by: Frank Binns <frank.binns@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38352>
This commit is contained in:
parent
b2b8ec1a4c
commit
1eab712245
4 changed files with 21 additions and 19 deletions
|
|
@ -37,6 +37,10 @@
|
||||||
#include "vk_alloc.h"
|
#include "vk_alloc.h"
|
||||||
#include "vk_log.h"
|
#include "vk_log.h"
|
||||||
|
|
||||||
|
static_assert(PVR_STATIC_CLEAR_PPP_PDS_TYPE_TEXTUREDATABASE + 1 ==
|
||||||
|
PVR_STATIC_CLEAR_PDS_STATE_COUNT,
|
||||||
|
"pvr_static_clear_ppp_pds_state_type might require fixing.");
|
||||||
|
|
||||||
static void pvr_device_setup_graphics_static_clear_ppp_base(
|
static void pvr_device_setup_graphics_static_clear_ppp_base(
|
||||||
struct pvr_static_clear_ppp_base *const base)
|
struct pvr_static_clear_ppp_base *const base)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,6 @@ enum pvr_static_clear_ppp_pds_state_type {
|
||||||
PVR_STATIC_CLEAR_PPP_PDS_TYPE_TEXTUREDATABASE = 5,
|
PVR_STATIC_CLEAR_PPP_PDS_TYPE_TEXTUREDATABASE = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
static_assert(PVR_STATIC_CLEAR_PPP_PDS_TYPE_TEXTUREDATABASE + 1 ==
|
|
||||||
PVR_STATIC_CLEAR_PDS_STATE_COUNT,
|
|
||||||
"pvr_static_clear_ppp_pds_state_type might require fixing.");
|
|
||||||
|
|
||||||
#define PVR_STATIC_CLEAR_VARIANT_COUNT (VK_IMAGE_ASPECT_STENCIL_BIT << 1U)
|
#define PVR_STATIC_CLEAR_VARIANT_COUNT (VK_IMAGE_ASPECT_STENCIL_BIT << 1U)
|
||||||
|
|
||||||
struct pvr_bo;
|
struct pvr_bo;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,23 @@
|
||||||
#include "vk_log.h"
|
#include "vk_log.h"
|
||||||
#include "vk_util.h"
|
#include "vk_util.h"
|
||||||
|
|
||||||
|
static_assert(pvr_cmd_length(PBESTATE_REG_WORD0) == 2,
|
||||||
|
"PBESTATE_REG_WORD0 cannot be stored in uint64_t");
|
||||||
|
static_assert(pvr_cmd_length(PBESTATE_REG_WORD1) == 2,
|
||||||
|
"PBESTATE_REG_WORD1 cannot be stored in uint64_t");
|
||||||
|
static_assert(ROGUE_NUM_PBESTATE_REG_WORDS >= 2,
|
||||||
|
"Cannot store both PBESTATE_REG_WORD{0,1}");
|
||||||
|
|
||||||
|
static_assert(pvr_cmd_length(CR_PDS_BGRND0_BASE) == 2,
|
||||||
|
"CR_PDS_BGRND0_BASE cannot be stored in uint64_t");
|
||||||
|
static_assert(pvr_cmd_length(CR_PDS_BGRND1_BASE) == 2,
|
||||||
|
"CR_PDS_BGRND1_BASE cannot be stored in uint64_t");
|
||||||
|
static_assert(pvr_cmd_length(CR_PDS_BGRND3_SIZEINFO) == 2,
|
||||||
|
"CR_PDS_BGRND3_SIZEINFO cannot be stored in uint64_t");
|
||||||
|
static_assert(ROGUE_NUM_CR_PDS_BGRND_WORDS == 3,
|
||||||
|
"Cannot store all CR_PDS_BGRND words");
|
||||||
|
|
||||||
|
|
||||||
#define ROGUE_BIF_PM_FREELIST_BASE_ADDR_ALIGNSIZE 16U
|
#define ROGUE_BIF_PM_FREELIST_BASE_ADDR_ALIGNSIZE 16U
|
||||||
|
|
||||||
/* FIXME: Is there a hardware define we can use instead? */
|
/* FIXME: Is there a hardware define we can use instead? */
|
||||||
|
|
|
||||||
|
|
@ -133,26 +133,11 @@ struct pvr_render_job {
|
||||||
*/
|
*/
|
||||||
uint32_t max_tiles_in_flight;
|
uint32_t max_tiles_in_flight;
|
||||||
|
|
||||||
static_assert(pvr_cmd_length(PBESTATE_REG_WORD0) == 2,
|
|
||||||
"PBESTATE_REG_WORD0 cannot be stored in uint64_t");
|
|
||||||
static_assert(pvr_cmd_length(PBESTATE_REG_WORD1) == 2,
|
|
||||||
"PBESTATE_REG_WORD1 cannot be stored in uint64_t");
|
|
||||||
static_assert(ROGUE_NUM_PBESTATE_REG_WORDS >= 2,
|
|
||||||
"Cannot store both PBESTATE_REG_WORD{0,1}");
|
|
||||||
uint64_t pbe_reg_words[PVR_MAX_COLOR_ATTACHMENTS]
|
uint64_t pbe_reg_words[PVR_MAX_COLOR_ATTACHMENTS]
|
||||||
[ROGUE_NUM_PBESTATE_REG_WORDS];
|
[ROGUE_NUM_PBESTATE_REG_WORDS];
|
||||||
uint64_t pr_pbe_reg_words[PVR_MAX_COLOR_ATTACHMENTS]
|
uint64_t pr_pbe_reg_words[PVR_MAX_COLOR_ATTACHMENTS]
|
||||||
[ROGUE_NUM_PBESTATE_REG_WORDS];
|
[ROGUE_NUM_PBESTATE_REG_WORDS];
|
||||||
|
|
||||||
static_assert(pvr_cmd_length(CR_PDS_BGRND0_BASE) == 2,
|
|
||||||
"CR_PDS_BGRND0_BASE cannot be stored in uint64_t");
|
|
||||||
static_assert(pvr_cmd_length(CR_PDS_BGRND1_BASE) == 2,
|
|
||||||
"CR_PDS_BGRND1_BASE cannot be stored in uint64_t");
|
|
||||||
static_assert(pvr_cmd_length(CR_PDS_BGRND3_SIZEINFO) == 2,
|
|
||||||
"CR_PDS_BGRND3_SIZEINFO cannot be stored in uint64_t");
|
|
||||||
static_assert(ROGUE_NUM_CR_PDS_BGRND_WORDS == 3,
|
|
||||||
"Cannot store all CR_PDS_BGRND words");
|
|
||||||
|
|
||||||
struct pvr_view_state {
|
struct pvr_view_state {
|
||||||
struct {
|
struct {
|
||||||
uint32_t pds_pixel_event_data_offset;
|
uint32_t pds_pixel_event_data_offset;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue