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=2855c93ea6662f48597884e8776d68e27a376a53;hpb=1fa7789e828d1005e2473fc7cd364bd45eb30843;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 2855c93ea66..4a0709b4468 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -131,6 +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_BINDING_TABLE 0x2000 #define BRW_NEW_INDICES 0x4000 #define BRW_NEW_VERTICES 0x8000 /** @@ -143,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 */ @@ -160,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; }; @@ -171,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 @@ -193,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 { @@ -252,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. @@ -301,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 }; @@ -318,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; }; @@ -339,7 +348,7 @@ struct brw_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]; }; @@ -376,8 +385,6 @@ struct brw_tracked_state { #define CACHE_NEW_CLIP_VP (1<