#define VC5_DIRTY_BLEND_COLOR (1 << 7)
#define VC5_DIRTY_STENCIL_REF (1 << 8)
-#define VC5_DIRTY_SAMPLE_MASK (1 << 9)
+#define VC5_DIRTY_SAMPLE_STATE (1 << 9)
#define VC5_DIRTY_FRAMEBUFFER (1 << 10)
#define VC5_DIRTY_STIPPLE (1 << 11)
#define VC5_DIRTY_VIEWPORT (1 << 12)
#define VC5_DIRTY_STREAMOUT (1 << 27)
#define VC5_DIRTY_OQ (1 << 28)
#define VC5_DIRTY_CENTROID_FLAGS (1 << 29)
+#define VC5_DIRTY_NOPERSPECTIVE_FLAGS (1 << 30)
#define VC5_MAX_FS_INPUTS 64
struct pipe_vertex_element pipe[VC5_MAX_ATTRIBUTES];
unsigned num_elements;
- uint8_t attrs[12 * VC5_MAX_ATTRIBUTES];
+ uint8_t attrs[16 * VC5_MAX_ATTRIBUTES];
struct v3d_bo *default_attribute_values;
};
struct v3d_streamout_stateobj {
struct pipe_stream_output_target *targets[PIPE_MAX_SO_BUFFERS];
+ /* Number of vertices we've written into the buffer so far. */
+ uint32_t offsets[PIPE_MAX_SO_BUFFERS];
unsigned num_targets;
};
/** @{ Current pipeline state objects */
struct pipe_scissor_state scissor;
- struct pipe_blend_state *blend;
+ struct v3d_blend_state *blend;
struct v3d_rasterizer_state *rasterizer;
struct v3d_depth_stencil_alpha_state *zsa;
struct v3d_rasterizer_state {
struct pipe_rasterizer_state base;
- /* VC5_CONFIGURATION_BITS */
- uint8_t config_bits[3];
-
float point_size;
/**
* VC5_PACKET_DEPTH_OFFSET
*/
uint16_t offset_units;
+ /**
+ * The HW treats polygon offset units based on a Z24 buffer, so we
+ * need to scale up offset_units if we're only Z16.
+ */
+ uint16_t z16_offset_units;
/**
* Half-float (1/8/7 bits) value of polygon offset scale for
* VC5_PACKET_DEPTH_OFFSET
enum v3d_ez_state ez_state;
- /** Uniforms for stencil state.
- *
- * Index 0 is either the front config, or the front-and-back config.
- * Index 1 is the back config if doing separate back stencil.
- * Index 2 is the writemask config if it's not a common mask value.
- */
- uint32_t stencil_uniforms[3];
-
uint8_t stencil_front[6];
uint8_t stencil_back[6];
};
+struct v3d_blend_state {
+ struct pipe_blend_state base;
+
+ /* Per-RT mask of whether blending is enabled. */
+ uint8_t blend_enables;
+};
+
#define perf_debug(...) do { \
if (unlikely(V3D_DEBUG & V3D_DEBUG_PERF)) \
fprintf(stderr, __VA_ARGS__); \