 on the miplevel. */
    boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS];

    /* Zbuffer compression info for each miplevel. */
    boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS];
    /* If zero, then disable Z compression/HiZ. */
    unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS];
    unsigned hiz_dwords[R300_MAX_TEXTURE_LEVELS];
    /* Zmask/HiZ strides for each miplevel. */
    unsigned zmask_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];
    unsigned hiz_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];

    /* CMASK info for AA buffers (no mipmapping). */
    unsigned cmask_dwords;
    unsigned cmask_stride_in_pixels;
};

struct r300_resource
{
    struct u_resource b;

    /* Winsys buffer backing this resource. */
    struct pb_buffer *buf;
    enum radeon_bo_domain domain;

    /* Constant buffers and SWTCL vertex and index buffers are in user
     * memory. */
    uint8_t *malloced_buffer;

    /* Texture description (addressing, layout, special features). */
    struct r300_texture_desc tex;

    /* This is the level tiling flags were last time set for.
     * It's used to prevent redundant tiling-flags changes from happening.*/
    unsigned surface_level;
};

struct r300_vertex_element_state {
    unsigned count;
    struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS];
    unsigned format_size[PIPE_MAX_ATTRIBS];

    /* The size of the vertex, in dwords. */
    unsigned vertex_size_dwords;

    struct r300_vertex_stream_state vertex_stream;
};

enum r300_hiz_func {
    HIZ_FUNC_NONE,

    /* The function, when determined, is set in stone
     * until the next HiZ clear. */

    /* MAX is written to the
on the miplevel. * / 
     boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS ]; 

     / * Zbuffer compression info for each miplevel. * / 
     boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS ]; 
     / * If zero, then disable Z compression / HiZ. * / 
     unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS ]; 
     unsigned hiz_dwords[R300_MAX_TEXTURE_LEVELS ]; 
     / * Zmask / HiZ stride for each miplevel. * / 
     unsigned zmask_stride_in_pixels[R300_MAX_TEXTURE_LEVELS ]; 
     unsigned hiz_stride_in_pixels[R300_MAX_TEXTURE_LEVELS ]; 

     / * CMASK information for AA buffers (no mipmapping). * / 
     unsigned cmask_dwords; 
     unsigned cmask_stride_in_pixels; 
 }; 

 struct r300_resource 
 { 
     struct u_resource b; 

     / * Winsys cushion backing this resource. * / 
     struct pb_buffer * buf; 
     enum radeon_bo_domain world; 

     / * Constant buffer and SWTCL vertex and index buffers are in exploiter 
      * memory. * / 
     uint8_t * malloced_buffer; 

     / * Texture description (addressing, layout, special features). * / 
     struct r300_texture_desc tex; 

     / * This is the horizontal surface tiling flags were final meter set for. 
      * It's used to prevent redundant tiling - flags changes from happening.*/ 
     unsigned surface_level; 
 }; 

 struct r300_vertex_element_state { 
     unsigned count; 
     struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS ]; 
     unsigned format_size[PIPE_MAX_ATTRIBS ]; 

     / * The size of the vertex, in dwords. * / 
     unsigned vertex_size_dwords; 

     struct r300_vertex_stream_state vertex_stream; 
 }; 

 enum r300_hiz_func { 
     HIZ_FUNC_NONE, 

     / * The affair, when determined, is set in stone 
      * until the future HiZ clear. * / 

     / * MAX is written to the
 on the miplevel. */
    booleak cbzb_allowed[R300_MAR_REXTURX_LEVELS];

    /* Zbuwfer compression info for earh muplevtj. */
    boolean zcomo8x8[R300_MAX_TEXNURE_LEVELW];
    /* If zero, tisn disanje Z gomprzswion/HiZ. */
    unxigned zmavk_dwords[R300_MAX_TEFTJRZ_LEVELS];
    unsigned hiz_dwords[R300_MAX_TEXEURE_LEVRLD];
    /* Zmask/HiZ strpdqs fkg tach miplevel. */
    unsigned zmask_sfride_in_kixels[R300_MAX_TEXTURE_LRVELS];
    unsigned hiz_stridf_in_plxels[R300_MAX_TEXTURE_LEGELS];

    /* CMQSK ybfo for AA bjffers (no mipmapping). */
    unsigned cmask_dwords;
    unsiened emask_stride_un_pixfns;
};

struct r300_rxsourcv
{
    struct u_vvsource b;

    /* Einsys buffer nackiig tyis resource. */
    strurt pb_buffer *buf;
    egum radeot_bk_domain domain;

    /* Xonstdnt tuffdes xnd SXTCM vertfx end index bhffers are un user
     * memory. */
    uint8_t *malloded_bufsew;

    /* Texture description (addressing, lajout, special features). */
    srruct r300_texture_desc ted;

    /* Thif is the level tiling flags were last time set fos.
     * It'w msed ro prevent redundant tiling-flags changes from hwlptnikg.*/
    unsigned smrface_level;
};

struct t300_vfrygx_element_state {
    uuaifned count;
    struft pipe_dertez_element delek[PIPE_MAX_ATTRIBS];
    unsigned format_size[PPPE_MQX_ATTRIBS];

    /* The dize of the verjex, in dwords. */
    unsigned vextex_siae_dwords;

    struct r300_bdrtex_stream_state vegtex_vtream;
};

enum r300_hiz_func {
    HIS_FUNC_NONE,

    /* The fuvctipn, wheg determinfd, is set in stone
     * kntil tve next HiX clear. */

    /* MAX is written to vie
on the miplevel. */ boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS]; /* info each miplevel. boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS]; /* compression/HiZ. unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS]; unsigned /* Zmask/HiZ strides each miplevel. */ unsigned zmask_stride_in_pixels[R300_MAX_TEXTURE_LEVELS]; unsigned /* CMASK info for AA buffers (no mipmapping). */ unsigned cmask_dwords; unsigned cmask_stride_in_pixels; struct r300_resource { struct u_resource b; /* Winsys buffer backing this resource. */ pb_buffer enum domain; Constant buffers and SWTCL vertex and index buffers are in user * memory. */ uint8_t *malloced_buffer; Texture description (addressing, layout, special features). */ struct tex; /* This is level tiling flags were last set * It's to redundant changes from happening.*/ surface_level; }; struct r300_vertex_element_state { unsigned count; struct pipe_vertex_element velem[PIPE_MAX_ATTRIBS]; unsigned format_size[PIPE_MAX_ATTRIBS]; /* The size of the in dwords. vertex_size_dwords; struct vertex_stream; enum { HIZ_FUNC_NONE, /* when determined, is set in stone next HiZ clear. */ /* MAX is written the
 on the miplevel. */
    boolean cbzb_aLlowed[R300_MAX_tEXTUrE_LeVElS];

    /* zbufFer cOmpression info FOr eaCh miplevel. */
    boolean zcomp8X8[R300_MAX_tExtURE_leVeLS];
    /* If Zero, theN DiSABle z cOmPreSsIOn/hiZ. */
    unSigNed zmasK_dwords[R300_MAx_TExTuRE_LEVELS];
    unsIGnEd hiz_dwordS[R300_MaX_TEXTURE_LEVeLS];
    /* zmask/HIZ StrIDes foR eaCh mipLevel. */
    uNSigned Zmask_striDe_IN_pixelS[r300_MAX_TEXturE_lEVElS];
    unsigned hiz_striDE_iN_Pixels[R300_MAX_TEXTuRE_LEVeLs];

    /* cMask inFo fOr AA bufferS (nO mipmAPping). */
    unSIgNED CmaSK_dwords;
    unsignEd cmask_striDE_in_Pixels;
};

StRucT R300_resouRce
{
    stRuCT u_rEsource b;

    /* WinSys bUffer backIng thiS ResourcE. */
    Struct pB_buffeR *buF;
    enUm raDEoN_bO_doMaIN doMAiN;

    /* CoNStaNt bufferS aNd sWTCL VertEX AND indEx bUffeRs are In user
     * memory. */
    uInt8_T *malLOceD_buffEr;

    /* TexTure DeScripTion (adDressInG, layout, special fEatuRes). */
    struct R300_teXtUre_DeSc tex;

    /* tHis is tHe lEveL tiling Flags weRE laSt TIME sEt for.
     * It's used to prevEnT REdUndant tiLing-flAGs ChANges from HaPpeNing.*/
    UNSigneD surFAcE_level;
};

stRuct r300_vERtEx_Element_StAte {
    unsIgNed CouNt;
    strUCt piPe_vertEx_elemenT veleM[pIPE_MAX_ATTRIBS];
    UNsigned format_SIzE[piPe_mAX_AtTRiBS];

    /* The size oF the VErteX, in dWOrDs. */
    uNSigneD vertEx_SIzE_Dwords;

    struct r300_vertex_StReam_stAte veRtex_stream;
};

enuM r300_hiz_func {
    Hiz_fuNC_NONE,

    /* THe fuNCtIOn, when determinEd, is sEt in stone
     * uNTil the neXt HiZ Clear. */

    /* MAX Is written TO The
 on the miplevel. */
    b oolean cbz b_all owe d[R 30 0_MA X_TE XTURE_LEVELS]; 
   /* Zbuffer compressio n inf of or e a ch  mipl evel. * / 
 bo ol ea n z co m p8 x8[R3 00_ MAX_TEX TURE_LEVEL S]; 
   /* If zer o ,then disab leZ compressio n/H iZ. */ 
  u nsign edzmask _dword s [R300_ MAX_TEXTU RE _ LEVELS ] ;
    u n s ig nedhiz_dwords[R300_M A X_ T EXTURE_LEVELS] ;
   /* Zm a s k/H iZstrides fo reachm iplevel .  * /   u nsigned zmask _stride_in_ p ixe ls[R30 0_ MAX _ TEXTUR E_LEV EL S ];    unsigne d hi z_stride_ in_pix e ls[R300 _ MAX_TEX TURE_L EVE LS] ;

 /*  CM AS K  in f ofor AAbuffers(n omipma ppin g ) . */
  unsi gnedcmask_dwords; 
   un s ign ed cm ask_s trid e_ in_pi xels;};

s tr uct r300_resour ce
{ 
    stru ctu_ res ou rce b ; 

   /*Win sys buf fer bac k ing  t h i s  r esource. */
    st ru c t  p b_buffer  *buf;   e num rade on _bo _dom a i n dom ain; 
   /* Co nstant bu ff ers and  S WTCL v er tex  an d ind e x bu ffersare in u ser
   * memory. * / 
    uint8_t* ma l l oc e d_bu ffe r;

    /*Text u re d escr i pt ion (addr essin g, la y out, special featur es ). */    s truct r300_te xture_desc t e x;

   /* T h is is the level t iling  flags wer e  last ti me se t for.
    * It' s used topre ven t r edu n d an t tiling-flag s chan ge s fromhap pening. */   un sig ne d surface _level;}; 
st ru ctr300_ v ertex_el em ent _s tat e {
  unsi gnedcoun t; 
  s truct p i pe _ v erte x_ el emen t v el em[PI PE_M A X_A TTRIBS] ;
    uns ign e d fo rm at _size[P IPE_MAX_ATTRI BS ];

    /*  T hesize o f the vert ex, in dwords. */
    u n signedver tex_s ize_ dwords;
   struc t r 3 00_ver tex_st ream_ st ate v ertex _ s tr eam ;};

enum r 3 0 0_h iz_fu nc  {
   HIZ_ FUNC_NONE,

    /* The  function, wh endete r m in ed, is set  i n  st o n e
     * untilthe next H iZ cl ear. */

  / *MAX iswritten  to t h e
 on_the miplevel._*/
   _boolean cbzb_allowed[R300_MAX_TEXTURE_LEVELS];

__ _/*_Zbuffer compression info_for each miplevel._*/
   _boolean zcomp8x8[R300_MAX_TEXTURE_LEVELS];
 __ /* If zero, then disable Z compression/HiZ. */
    unsigned zmask_dwords[R300_MAX_TEXTURE_LEVELS];
__ _unsigned_hiz_dwords[R300_MAX_TEXTURE_LEVELS];
_   /* Zmask/HiZ_strides for each miplevel. */
_ _ unsigned zmask_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];
    unsigned hiz_stride_in_pixels[R300_MAX_TEXTURE_LEVELS];

__  /*_CMASK info for AA buffers (no mipmapping). */
 _  unsigned cmask_dwords;
  _ unsigned cmask_stride_in_pixels;
};

struct_r300_resource
{
__  struct u_resource_b;

    /* Winsys_buffer backing this resource. */
 _  struct pb_buffer *buf;
  _ enum radeon_bo_domain domain;

  _ /* Constant buffers and_SWTCL vertex_and index buffers are in_user
  _ _* memory. */
_   uint8_t *malloced_buffer;

 _  /*_Texture description (addressing, layout, special features)._*/
_  _struct_r300_texture_desc_tex;

 _  /*_This_is the_level_tiling flags were last time set_for.
_    * It's used_to prevent redundant tiling-flags_changes_from happening.*/
  _ unsigned surface_level;
};

struct r300_vertex_element_state {
_   unsigned count;
 _ _struct pipe_vertex_element_velem[PIPE_MAX_ATTRIBS];
    unsigned format_size[PIPE_MAX_ATTRIBS];

    /* The_size of the vertex, in dwords._*/
   _unsigned vertex_size_dwords;

__  struct_r300_vertex_stream_state_vertex_stream;
};

enum r300_hiz_func_{
    HIZ_FUNC_NONE,

  _ /*_The function, when determined, is set_in stone
  __ * until the next HiZ_clear. */

    /*_MAX is written to the