panfrost: Move special_varying to compiler definitions
The number of special varyings on midgard can influence how much space we need to allocate for varyings in the compiler ABI. Move the enum so we can get access it. No functional change. This is cc stable purely so the following patches can be backported. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13070>
This commit is contained in:
parent
7ffb152276
commit
00b0529061
|
@ -36,30 +36,6 @@
|
|||
#include "genxml/gen_macros.h"
|
||||
#include "pan_device.h"
|
||||
|
||||
/* Indices for named (non-XFB) varyings that are present. These are packed
|
||||
* tightly so they correspond to a bitfield present (P) indexed by (1 <<
|
||||
* PAN_VARY_*). This has the nice property that you can lookup the buffer index
|
||||
* of a given special field given a shift S by:
|
||||
*
|
||||
* idx = popcount(P & ((1 << S) - 1))
|
||||
*
|
||||
* That is... look at all of the varyings that come earlier and count them, the
|
||||
* count is the new index since plus one. Likewise, the total number of special
|
||||
* buffers required is simply popcount(P)
|
||||
*/
|
||||
|
||||
enum pan_special_varying {
|
||||
PAN_VARY_GENERAL = 0,
|
||||
PAN_VARY_POSITION = 1,
|
||||
PAN_VARY_PSIZ = 2,
|
||||
PAN_VARY_PNTCOORD = 3,
|
||||
PAN_VARY_FACE = 4,
|
||||
PAN_VARY_FRAGCOORD = 5,
|
||||
|
||||
/* Keep last */
|
||||
PAN_VARY_MAX,
|
||||
};
|
||||
|
||||
/* Tiler structure size computation */
|
||||
|
||||
unsigned
|
||||
|
|
|
@ -29,6 +29,30 @@
|
|||
#include "util/u_dynarray.h"
|
||||
#include "util/hash_table.h"
|
||||
|
||||
/* Indices for named (non-XFB) varyings that are present. These are packed
|
||||
* tightly so they correspond to a bitfield present (P) indexed by (1 <<
|
||||
* PAN_VARY_*). This has the nice property that you can lookup the buffer index
|
||||
* of a given special field given a shift S by:
|
||||
*
|
||||
* idx = popcount(P & ((1 << S) - 1))
|
||||
*
|
||||
* That is... look at all of the varyings that come earlier and count them, the
|
||||
* count is the new index since plus one. Likewise, the total number of special
|
||||
* buffers required is simply popcount(P)
|
||||
*/
|
||||
|
||||
enum pan_special_varying {
|
||||
PAN_VARY_GENERAL = 0,
|
||||
PAN_VARY_POSITION = 1,
|
||||
PAN_VARY_PSIZ = 2,
|
||||
PAN_VARY_PNTCOORD = 3,
|
||||
PAN_VARY_FACE = 4,
|
||||
PAN_VARY_FRAGCOORD = 5,
|
||||
|
||||
/* Keep last */
|
||||
PAN_VARY_MAX,
|
||||
};
|
||||
|
||||
/* Define the general compiler entry point */
|
||||
|
||||
#define MAX_SYSVAL_COUNT 32
|
||||
|
|
Loading…
Reference in New Issue