iris: initial render state upload

This commit is contained in:
Kenneth Graunke
2017-12-27 02:54:26 -08:00
parent 26fb5a8ae2
commit d3d6ef37f6
5 changed files with 204 additions and 9 deletions

View File

@@ -30,6 +30,7 @@
#include "iris_screen.h"
struct iris_bo;
struct iris_batch;
#define IRIS_MAX_TEXTURE_SAMPLERS 32
#define IRIS_MAX_VIEWPORTS 16
@@ -39,8 +40,14 @@ enum iris_dirty {
IRIS_DIRTY_POLYGON_STIPPLE,
IRIS_DIRTY_SCISSOR_RECT,
IRIS_DIRTY_WM_DEPTH_STENCIL,
IRIS_DIRTY_CC_VIEWPORT,
IRIS_DIRTY_SF_CL_VIEWPORT,
IRIS_DIRTY_PS_BLEND,
IRIS_DIRTY_BLEND_STATE,
};
struct iris_depth_stencil_alpha_state;
#define IRIS_NEW_COLOR_CALC_STATE (1ull << IRIS_DIRTY_COLOR_CALC_STATE)
#define IRIS_NEW_POLYGON_STIPPLE (1ull << IRIS_DIRTY_POLYGON_STIPPLE)
#define IRIS_NEW_SCISSOR_RECT (1ull << IRIS_DIRTY_SCISSOR_RECT)
@@ -53,6 +60,8 @@ struct iris_context {
struct {
uint64_t dirty;
struct iris_blend_state *cso_blend;
struct iris_depth_stencil_alpha_state *cso_zsa;
struct pipe_blend_color blend_color;
struct pipe_poly_stipple poly_stipple;
struct pipe_scissor_state scissors[IRIS_MAX_VIEWPORTS];
@@ -75,4 +84,6 @@ iris_create_context(struct pipe_screen *screen, void *priv, unsigned flags);
void iris_init_program_functions(struct pipe_context *ctx);
void iris_init_state_functions(struct pipe_context *ctx);
void iris_upload_render_state(struct iris_context *ice, struct iris_batch *batch);
#endif