r100_track.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_parse_vline(struct radeon_cs_parser *p);
  76. int r200_packet0_check(struct radeon_cs_parser *p,
  77. struct radeon_cs_packet *pkt,
  78. unsigned idx, unsigned reg);
  79. int r100_reloc_pitch_offset(struct radeon_cs_parser *p,
  80. struct radeon_cs_packet *pkt,
  81. unsigned idx,
  82. unsigned reg);
  83. int r100_packet3_load_vbpntr(struct radeon_cs_parser *p,
  84. struct radeon_cs_packet *pkt,
  85. int idx);