X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fbrw_context.h;h=4a0709b4468ebdf08eb3e9153b806a8014bc4386;hb=dbf3a15313eed930a3d8fdde12e457259c43651b;hp=0dd3087143f7a813c93b9c8f03c3e2a2a93e99aa;hpb=fd70841121475d7aad98812d6bf9c9c67567b89a;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 0dd3087143f..4a0709b4468 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -131,7 +131,7 @@ struct brw_context; #define BRW_NEW_WM_INPUT_DIMENSIONS 0x100 #define BRW_NEW_PSP 0x800 #define BRW_NEW_WM_SURFACES 0x1000 -#define BRW_NEW_FENCE 0x2000 +#define BRW_NEW_BINDING_TABLE 0x2000 #define BRW_NEW_INDICES 0x4000 #define BRW_NEW_VERTICES 0x8000 /** @@ -144,6 +144,8 @@ struct brw_context; #define BRW_NEW_NR_WM_SURFACES 0x40000 #define BRW_NEW_NR_VS_SURFACES 0x80000 #define BRW_NEW_INDEX_BUFFER 0x100000 +#define BRW_NEW_VS_CONSTBUF 0x200000 +#define BRW_NEW_WM_CONSTBUF 0x200000 struct brw_state_flags { /** State update flags signalled by mesa internals */ @@ -161,7 +163,6 @@ struct brw_state_flags { struct brw_vertex_program { struct gl_vertex_program program; GLuint id; - dri_bo *const_buffer; /** Program constant buffer/surface */ GLboolean use_const_buffer; }; @@ -172,13 +173,20 @@ struct brw_fragment_program { GLuint id; /**< serial no. to identify frag progs, never re-used */ GLboolean isGLSL; /**< really, any IF/LOOP/CONT/BREAK instructions */ - GLboolean use_const_buffer; - dri_bo *const_buffer; /** Program constant buffer/surface */ - /** for debugging, which texture units are referenced */ GLbitfield tex_units_used; }; +struct brw_shader { + struct gl_shader base; + + /** Shader IR transformed for native compile, at link time. */ + struct exec_list *ir; +}; + +struct brw_shader_program { + struct gl_shader_program base; +}; /* Data about a particular attempt to compile a program. Note that * there can be many of these, each in a different GL state @@ -194,12 +202,14 @@ struct brw_wm_prog_data { GLuint total_scratch; GLuint nr_params; /**< number of float params/constants */ + GLuint nr_pull_params; GLboolean error; /* Pointer to tracked values (only valid once * _mesa_load_state_parameters has been called at runtime). */ - const GLfloat *param[BRW_MAX_CURBE]; + const GLfloat *param[MAX_UNIFORMS * 4]; /* should be: BRW_MAX_CURBE */ + const GLfloat *pull_param[MAX_UNIFORMS * 4]; }; struct brw_sf_prog_data { @@ -253,7 +263,7 @@ struct brw_vs_ouput_sizes { #define BRW_MAX_TEX_UNIT 16 /** Max number of render targets in a shader */ -#define BRW_MAX_DRAW_BUFFERS 4 +#define BRW_MAX_DRAW_BUFFERS 8 /** * Size of our surface binding table for the WM. @@ -283,6 +293,9 @@ struct brw_vs_ouput_sizes { enum brw_cache_id { + BRW_BLEND_STATE, + BRW_DEPTH_STENCIL_STATE, + BRW_COLOR_CALC_STATE, BRW_CC_VP, BRW_CC_UNIT, BRW_WM_PROG, @@ -291,7 +304,7 @@ enum brw_cache_id { BRW_WM_UNIT, BRW_SF_PROG, BRW_SF_VP, - BRW_SF_UNIT, + BRW_SF_UNIT, /* scissor state on gen6 */ BRW_VS_UNIT, BRW_VS_PROG, BRW_GS_UNIT, @@ -299,8 +312,6 @@ enum brw_cache_id { BRW_CLIP_VP, BRW_CLIP_UNIT, BRW_CLIP_PROG, - BRW_SS_SURFACE, - BRW_SS_SURF_BIND, BRW_MAX_CACHE }; @@ -316,10 +327,10 @@ struct brw_cache_item { GLuint hash; GLuint key_size; /* for variable-sized keys */ const void *key; - dri_bo **reloc_bufs; + drm_intel_bo **reloc_bufs; GLuint nr_reloc_bufs; - dri_bo *bo; + drm_intel_bo *bo; struct brw_cache_item *next; }; @@ -332,13 +343,12 @@ struct brw_cache { struct brw_cache_item **items; GLuint size, n_items; - GLuint aux_size[BRW_MAX_CACHE]; char *name[BRW_MAX_CACHE]; /* Record of the last BOs chosen for each cache_id. Used to set * brw->state.dirty.cache when a new cache item is chosen. */ - dri_bo *last_bo[BRW_MAX_CACHE]; + drm_intel_bo *last_bo[BRW_MAX_CACHE]; }; @@ -356,6 +366,9 @@ struct brw_tracked_state { /* Flags for brw->state.cache. */ +#define CACHE_NEW_BLEND_STATE (1<