r100_track.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. #define R100_TRACK_MAX_TEXTURE 3
  2. #define R200_TRACK_MAX_TEXTURE 6
  3. #define R300_TRACK_MAX_TEXTURE 16
  4. #define R100_MAX_CB 1
  5. #define R300_MAX_CB 4
  6. /*
  7. * CS functions
  8. */
  9. struct r100_cs_track_cb {
  10. struct radeon_bo *robj;
  11. unsigned pitch;
  12. unsigned cpp;
  13. unsigned offset;
  14. };
  15. struct r100_cs_track_array {
  16. struct radeon_bo *robj;
  17. unsigned esize;
  18. };
  19. struct r100_cs_cube_info {
  20. struct radeon_bo *robj;
  21. unsigned offset;
  22. unsigned width;
  23. unsigned height;
  24. };
  25. #define R100_TRACK_COMP_NONE 0
  26. #define R100_TRACK_COMP_DXT1 1
  27. #define R100_TRACK_COMP_DXT35 2
  28. struct r100_cs_track_texture {
  29. struct radeon_bo *robj;
  30. struct r100_cs_cube_info cube_info[5]; /* info for 5 non-primary faces */
  31. unsigned pitch;
  32. unsigned width;
  33. unsigned height;
  34. unsigned num_levels;
  35. unsigned cpp;
  36. unsigned tex_coord_type;
  37. unsigned txdepth;
  38. unsigned width_11;
  39. unsigned height_11;
  40. bool use_pitch;
  41. bool enabled;
  42. bool lookup_disable;
  43. bool roundup_w;
  44. bool roundup_h;
  45. unsigned compress_format;
  46. };
  47. struct r100_cs_track {
  48. unsigned num_cb;
  49. unsigned num_texture;
  50. unsigned maxy;
  51. unsigned vtx_size;
  52. unsigned vap_vf_cntl;
  53. unsigned vap_alt_nverts;
  54. unsigned immd_dwords;
  55. unsigned num_arrays;
  56. unsigned max_indx;
  57. unsigned color_channel_mask;
  58. struct r100_cs_track_array arrays[16];
  59. struct r100_cs_track_cb cb[R300_MAX_CB];
  60. struct r100_cs_track_cb zb;
  61. struct r100_cs_track_cb aa;
  62. struct r100_cs_track_texture textures[R300_TRACK_MAX_TEXTURE];
  63. bool z_enabled;
  64. bool separate_cube;
  65. bool zb_cb_clear;
  66. bool blend_read_enable;
  67. bool cb_dirty;
  68. bool zb_dirty;
  69. bool tex_dirty;
  70. bool aa_dirty;
  71. bool aaresolve;
  72. };
  73. int r100_cs_track_check(struct radeon_device *rdev, struct r100_cs_track *track);
  74. void r100_cs_track_clear(struct radeon_device *rdev, struct r100_cs_track *track);
  75. int r100_cs_packet_next_reloc(struct radeon_cs_parser *p,
  76. struct radeon_cs_reloc **cs_reloc);
  77. void r100_cs_dump_packet(struct radeon_cs_parser *p,
  78. struct radeon_cs_packet *pkt);
  79. int r100_cs_packet_parse_vline(struct radeon_cs_parser *p);
  80. int r200_packet0_check(struct radeon_cs_parser *p,
  81. struct radeon_cs_packet *pkt,
  82. unsigned idx, unsigned reg);
  83. int r100_reloc_pitch_offset(struct radeon_cs_parser *p,
  84. struct radeon_cs_packet *pkt,
  85. unsigned idx,
  86. unsigned reg);
  87. int r100_packet3_load_vbpntr(struct radeon_cs_parser *p,
  88. struct radeon_cs_packet *pkt,
  89. int idx);