-#include "fd3_util.h"
-#include "ir3.h"
-#include "disasm.h"
-
-typedef uint16_t fd3_semantic; /* semantic name + index */
-static inline fd3_semantic
-fd3_semantic_name(uint8_t name, uint16_t index)
-{
- return (name << 8) | (index & 0xff);
-}
-
-static inline uint8_t sem2name(fd3_semantic sem)
-{
- return sem >> 8;
-}
-
-static inline uint16_t sem2idx(fd3_semantic sem)
-{
- return sem & 0xff;
-}
-
-struct fd3_shader_variant {
- struct fd_bo *bo;
-
- struct fd3_shader_key key;
-
- struct ir3_shader_info info;
- struct ir3_shader *ir;
-
- /* the instructions length is in units of instruction groups
- * (4 instructions, 8 dwords):
- */
- unsigned instrlen;
-
- /* the constants length is in units of vec4's, and is the sum of
- * the uniforms and the built-in compiler constants
- */
- unsigned constlen;
-
- /* About Linkage:
- * + Let the frag shader determine the position/compmask for the
- * varyings, since it is the place where we know if the varying
- * is actually used, and if so, which components are used. So
- * what the hw calls "outloc" is taken from the "inloc" of the
- * frag shader.
- * + From the vert shader, we only need the output regid
- */
-
- /* for frag shader, pos_regid holds the frag_pos, ie. what is passed
- * to bary.f instructions
- */
- uint8_t pos_regid;
- bool frag_coord, frag_face;
-
- /* varyings/outputs: */
- unsigned outputs_count;
- struct {
- fd3_semantic semantic;
- uint8_t regid;
- } outputs[16];
- bool writes_pos;