@@ -253,13 +253,6 @@ struct Liverpool {
253
253
}
254
254
};
255
255
256
- struct ModeControl {
257
- s32 msaa_enable : 1 ;
258
- s32 vport_scissor_enable : 1 ;
259
- s32 line_stripple_enable : 1 ;
260
- s32 send_unlit_stiles_to_pkr : 1 ;
261
- };
262
-
263
256
enum class ZOrder : u32 {
264
257
LateZ = 0 ,
265
258
EarlyZLateZ = 1 ,
@@ -571,39 +564,29 @@ struct Liverpool {
571
564
s16 top_left_x;
572
565
s16 top_left_y;
573
566
};
574
- struct {
575
- s16 bottom_right_x;
576
- s16 bottom_right_y;
567
+ union {
568
+ BitField< 0 , 15 , u32 > bottom_right_x;
569
+ BitField< 16 , 15 , u32 > bottom_right_y;
577
570
};
578
571
579
- // From AMD spec: 'Negative numbers clamped to 0'
580
- static s16 Clamp (s16 value) {
581
- return std::max (s16 (0 ), value);
582
- }
583
-
584
572
u32 GetWidth () const {
585
- return static_cast <u32 >(Clamp ( bottom_right_x) - Clamp ( top_left_x) );
573
+ return static_cast <u32 >(bottom_right_x - top_left_x);
586
574
}
587
575
588
576
u32 GetHeight () const {
589
- return static_cast <u32 >(Clamp ( bottom_right_y) - Clamp ( top_left_y) );
577
+ return static_cast <u32 >(bottom_right_y - top_left_y);
590
578
}
591
579
};
592
580
593
- struct WindowOffset {
594
- s32 window_x_offset : 16 ;
595
- s32 window_y_offset : 16 ;
596
- };
597
-
598
581
struct ViewportScissor {
599
582
union {
600
583
BitField<0 , 15 , s32> top_left_x;
601
- BitField<16 , 15 , s32> top_left_y;
602
- BitField<31 , 1 , s32> window_offset_disable;
584
+ BitField<15 , 15 , s32> top_left_y;
585
+ BitField<30 , 1 , s32> window_offset_disable;
603
586
};
604
- struct {
605
- s16 bottom_right_x;
606
- s16 bottom_right_y;
587
+ union {
588
+ BitField< 0 , 15 , s32> bottom_right_x;
589
+ BitField< 15 , 15 , s32> bottom_right_y;
607
590
};
608
591
609
592
u32 GetWidth () const {
@@ -1008,14 +991,10 @@ struct Liverpool {
1008
991
Scissor screen_scissor;
1009
992
INSERT_PADDING_WORDS (0xA010 - 0xA00C - 2 );
1010
993
DepthBuffer depth_buffer;
1011
- INSERT_PADDING_WORDS (0xA080 - 0xA018 );
1012
- WindowOffset window_offset;
1013
- ViewportScissor window_scissor;
1014
- INSERT_PADDING_WORDS (0xA08E - 0xA081 - 2 );
994
+ INSERT_PADDING_WORDS (0xA08E - 0xA018 );
1015
995
ColorBufferMask color_target_mask;
1016
996
ColorBufferMask color_shader_mask;
1017
- ViewportScissor generic_scissor;
1018
- INSERT_PADDING_WORDS (2 );
997
+ INSERT_PADDING_WORDS (0xA094 - 0xA08E - 2 );
1019
998
std::array<ViewportScissor, NumViewports> viewport_scissors;
1020
999
std::array<ViewportDepth, NumViewports> viewport_depths;
1021
1000
INSERT_PADDING_WORDS (0xA103 - 0xA0D4 );
@@ -1053,9 +1032,7 @@ struct Liverpool {
1053
1032
PolygonControl polygon_control;
1054
1033
ViewportControl viewport_control;
1055
1034
VsOutputControl vs_output_control;
1056
- INSERT_PADDING_WORDS (0xA292 - 0xA207 - 1 );
1057
- ModeControl mode_control;
1058
- INSERT_PADDING_WORDS (0xA29D - 0xA292 - 1 );
1035
+ INSERT_PADDING_WORDS (0xA29E - 0xA207 - 2 );
1059
1036
u32 index_size;
1060
1037
u32 max_index_size;
1061
1038
IndexBufferType index_buffer_type;
@@ -1267,11 +1244,8 @@ static_assert(GFX6_3D_REG_INDEX(depth_htile_data_base) == 0xA005);
1267
1244
static_assert (GFX6_3D_REG_INDEX(screen_scissor) == 0xA00C );
1268
1245
static_assert (GFX6_3D_REG_INDEX(depth_buffer.z_info) == 0xA010 );
1269
1246
static_assert (GFX6_3D_REG_INDEX(depth_buffer.depth_slice) == 0xA017 );
1270
- static_assert (GFX6_3D_REG_INDEX(window_offset) == 0xA080 );
1271
- static_assert (GFX6_3D_REG_INDEX(window_scissor) == 0xA081 );
1272
1247
static_assert (GFX6_3D_REG_INDEX(color_target_mask) == 0xA08E );
1273
1248
static_assert (GFX6_3D_REG_INDEX(color_shader_mask) == 0xA08F );
1274
- static_assert (GFX6_3D_REG_INDEX(generic_scissor) == 0xA090 );
1275
1249
static_assert (GFX6_3D_REG_INDEX(viewport_scissors) == 0xA094 );
1276
1250
static_assert (GFX6_3D_REG_INDEX(primitive_restart_index) == 0xA103 );
1277
1251
static_assert (GFX6_3D_REG_INDEX(stencil_control) == 0xA10B );
@@ -1291,7 +1265,6 @@ static_assert(GFX6_3D_REG_INDEX(color_control) == 0xA202);
1291
1265
static_assert (GFX6_3D_REG_INDEX(clipper_control) == 0xA204 );
1292
1266
static_assert (GFX6_3D_REG_INDEX(viewport_control) == 0xA206 );
1293
1267
static_assert (GFX6_3D_REG_INDEX(vs_output_control) == 0xA207 );
1294
- static_assert (GFX6_3D_REG_INDEX(mode_control) == 0xA292 );
1295
1268
static_assert (GFX6_3D_REG_INDEX(index_size) == 0xA29D );
1296
1269
static_assert (GFX6_3D_REG_INDEX(index_buffer_type) == 0xA29F );
1297
1270
static_assert (GFX6_3D_REG_INDEX(enable_primitive_id) == 0xA2A1 );
0 commit comments