#define __PAN_IR_H
#include <stdint.h>
-#include "panfrost-job.h"
#include "compiler/nir/nir.h"
#include "util/u_dynarray.h"
#include "util/hash_table.h"
unsigned sysval_count;
unsigned sysvals[MAX_SYSVAL_COUNT];
- /* Boolean properties of the program */
- bool writes_point_size;
-
int first_tag;
struct util_dynarray compiled;
* (register spilling), or zero if no spilling is used */
unsigned tls_size;
- /* IN: For a fragment shader with a lowered alpha test, the ref value */
- float alpha_ref;
+ /* IN: Render target formats for output load/store lowering */
+ enum pipe_format rt_formats[8];
} panfrost_program;
typedef struct pan_block {
_entry_##v = _mesa_set_next_entry(blk->predecessors, _entry_##v), \
v = (struct pan_block *) (_entry_##v ? _entry_##v->key : NULL))
+static inline pan_block *
+pan_exit_block(struct list_head *blocks)
+{
+ pan_block *last = list_last_entry(blocks, pan_block, link);
+ assert(!last->successors[0] && !last->successors[1]);
+ return last;
+}
typedef void (*pan_liveness_update)(uint16_t *, void *, unsigned max);
}
}
+/* IR printing helpers */
+void pan_print_alu_type(nir_alu_type t, FILE *fp);
+
+/* Until it can be upstreamed.. */
+bool pan_has_source_mod(nir_alu_src *src, nir_op op);
+bool pan_has_dest_mod(nir_dest **dest, nir_op op);
+
#endif