+struct vc4_varying_semantic {
+ uint8_t semantic;
+ uint8_t index;
+ uint8_t swizzle;
+};
+
+struct vc4_compiler_ubo_range {
+ /**
+ * offset in bytes from the start of the ubo where this range is
+ * uploaded.
+ *
+ * Only set once used is set.
+ */
+ uint32_t dst_offset;
+
+ /**
+ * offset in bytes from the start of the gallium uniforms where the
+ * data comes from.
+ */
+ uint32_t src_offset;
+
+ /** size in bytes of this ubo range */
+ uint32_t size;
+
+ /**
+ * Set if this range is used by the shader for indirect uniforms
+ * access.
+ */
+ bool used;
+};
+
+struct vc4_compile {
+ struct vc4_context *vc4;
+ struct tgsi_parse_context parser;
+ struct qreg *temps;
+ /**
+ * Inputs to the shader, arranged by TGSI declaration order.
+ *
+ * Not all fragment shader QFILE_VARY reads are present in this array.
+ */
+ struct qreg *inputs;
+ struct qreg *outputs;
+ struct qreg *consts;
+ struct qreg addr[4]; /* TGSI ARL destination. */
+ uint32_t temps_array_size;
+ uint32_t inputs_array_size;
+ uint32_t outputs_array_size;
+ uint32_t uniforms_array_size;
+ uint32_t consts_array_size;
+ uint32_t num_consts;
+
+ struct vc4_compiler_ubo_range *ubo_ranges;
+ uint32_t ubo_ranges_array_size;
+ uint32_t num_ubo_ranges;
+ uint32_t next_ubo_dst_offset;
+
+ struct qreg line_x, point_x, point_y;
+ struct qreg discard;
+
+ /**
+ * Array of the TGSI semantics of all FS QFILE_VARY reads.
+ *
+ * This includes those that aren't part of the VPM varyings, like
+ * point/line coordinates.
+ */
+ struct vc4_varying_semantic *input_semantics;
+ uint32_t num_input_semantics;
+ uint32_t input_semantics_array_size;
+
+ /**
+ * An entry per outputs[] in the VS indicating what the semantic of
+ * the output is. Used to emit from the VS in the order that the FS
+ * needs.
+ */
+ struct vc4_varying_semantic *output_semantics;
+
+ struct pipe_shader_state *shader_state;
+ struct vc4_key *key;
+ struct vc4_fs_key *fs_key;
+ struct vc4_vs_key *vs_key;
+
+ uint32_t *uniform_data;
+ enum quniform_contents *uniform_contents;
+ uint32_t uniform_array_size;
+ uint32_t num_uniforms;
+ uint32_t num_outputs;
+ uint32_t num_texture_samples;
+ uint32_t output_position_index;
+ uint32_t output_clipvertex_index;
+ uint32_t output_color_index;
+ uint32_t output_point_size_index;
+