X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fdrivers%2Fdri%2Fi965%2Fbrw_context.h;h=c3c82297d4e376583d686800871bfcd744f639d8;hb=1149eedffc1a996dded9cdc55096d409e48d707b;hp=80dba1011fa70a22e4a24fd0cdbf311e646d980f;hpb=7a0fd3ca1d436591117d451ecee209a4cdb65aef;p=mesa.git diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965/brw_context.h index 80dba1011fa..c3c82297d4e 100644 --- a/src/mesa/drivers/dri/i965/brw_context.h +++ b/src/mesa/drivers/dri/i965/brw_context.h @@ -181,6 +181,7 @@ enum brw_state_id { BRW_STATE_META_IN_PROGRESS, BRW_STATE_INTERPOLATION_MAP, BRW_STATE_PUSH_CONSTANT_ALLOCATION, + BRW_STATE_NUM_SAMPLES, BRW_NUM_STATE_BITS }; @@ -220,6 +221,7 @@ enum brw_state_id { #define BRW_NEW_META_IN_PROGRESS (1 << BRW_STATE_META_IN_PROGRESS) #define BRW_NEW_INTERPOLATION_MAP (1 << BRW_STATE_INTERPOLATION_MAP) #define BRW_NEW_PUSH_CONSTANT_ALLOCATION (1 << BRW_STATE_PUSH_CONSTANT_ALLOCATION) +#define BRW_NEW_NUM_SAMPLES (1 << BRW_STATE_NUM_SAMPLES) struct brw_state_flags { /** State update flags signalled by mesa internals */ @@ -820,12 +822,6 @@ enum shader_time_shader_type { #define CACHE_NEW_CLIP_UNIT (1<DrawBuffer, updated by BRW_NEW_NUM_SAMPLES so + * that we don't have to reemit that state every time we change FBOs. + */ + int num_samples; /** * Platform specific constants containing the maximum number of threads @@ -1445,12 +1436,6 @@ struct brw_context struct intel_screen *intelScreen; }; -static inline bool -is_power_of_two(uint32_t value) -{ - return (value & (value - 1)) == 0; -} - /*====================================================================== * brw_vtbl.c */ @@ -1490,6 +1475,26 @@ GLboolean brwCreateContext(gl_api api, unsigned *error, void *sharedContextPrivate); +/*====================================================================== + * brw_misc_state.c + */ +GLuint brw_get_rb_for_slice(struct brw_context *brw, + struct intel_mipmap_tree *mt, + unsigned level, unsigned layer, bool flat); + +void brw_meta_updownsample(struct brw_context *brw, + struct intel_mipmap_tree *src, + struct intel_mipmap_tree *dst); + +void brw_meta_fbo_stencil_blit(struct brw_context *brw, + GLfloat srcX0, GLfloat srcY0, + GLfloat srcX1, GLfloat srcY1, + GLfloat dstX0, GLfloat dstY0, + GLfloat dstX1, GLfloat dstY1); + +void brw_meta_stencil_updownsample(struct brw_context *brw, + struct intel_mipmap_tree *src, + struct intel_mipmap_tree *dst); /*====================================================================== * brw_misc_state.c */ @@ -1571,7 +1576,8 @@ void brw_fs_alloc_reg_sets(struct intel_screen *screen); void brw_vec4_alloc_reg_set(struct intel_screen *screen); /* brw_disasm.c */ -int brw_disasm (FILE *file, struct brw_instruction *inst, int gen); +int brw_disassemble_inst(FILE *file, struct brw_context *brw, + struct brw_instruction *inst, bool is_compacted); /* brw_vs.c */ gl_clip_plane *brw_select_clip_planes(struct gl_context *ctx);