summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Tony Wasserka2014-12-21 02:55:51 +0100
committerGravatar Tony Wasserka2014-12-31 15:35:54 +0100
commit36291bc3f6e051f561b24408f7d3642235a749c8 (patch)
tree22cbcbc991d08b2131ac56a09b74ac3fcf1f32ba /src
parentPica: Fix A4, IA4 and IA8 texture formats. (diff)
downloadyuzu-36291bc3f6e051f561b24408f7d3642235a749c8.tar.gz
yuzu-36291bc3f6e051f561b24408f7d3642235a749c8.tar.xz
yuzu-36291bc3f6e051f561b24408f7d3642235a749c8.zip
Pica: Add output merger definitions.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/pica.h57
1 files changed, 56 insertions, 1 deletions
diff --git a/src/video_core/pica.h b/src/video_core/pica.h
index f518cc98b..4afda7b4b 100644
--- a/src/video_core/pica.h
+++ b/src/video_core/pica.h
@@ -289,7 +289,7 @@ struct Regs {
289 TevStageConfig tev_stage4; 289 TevStageConfig tev_stage4;
290 INSERT_PADDING_WORDS(0x3); 290 INSERT_PADDING_WORDS(0x3);
291 TevStageConfig tev_stage5; 291 TevStageConfig tev_stage5;
292 INSERT_PADDING_WORDS(0x13); 292 INSERT_PADDING_WORDS(0x3);
293 293
294 const std::array<Regs::TevStageConfig,6> GetTevStages() const { 294 const std::array<Regs::TevStageConfig,6> GetTevStages() const {
295 return { tev_stage0, tev_stage1, 295 return { tev_stage0, tev_stage1,
@@ -298,6 +298,59 @@ struct Regs {
298 }; 298 };
299 299
300 struct { 300 struct {
301 enum DepthFunc : u32 {
302 Always = 1,
303 GreaterThan = 6,
304 };
305
306 union {
307 // If false, logic blending is used
308 BitField<8, 1, u32> alphablend_enable;
309 };
310
311 union {
312 enum BlendEquation : u32 {
313 Add = 0,
314 };
315
316 enum BlendFactor : u32 {
317 Zero = 0,
318 One = 1,
319
320 SourceAlpha = 6,
321 OneMinusSourceAlpha = 7,
322 };
323
324 BitField< 0, 8, BlendEquation> blend_equation_rgb;
325 BitField< 8, 8, BlendEquation> blend_equation_a;
326
327 BitField<16, 4, BlendFactor> factor_source_rgb;
328 BitField<20, 4, BlendFactor> factor_dest_rgb;
329
330 BitField<24, 4, BlendFactor> factor_source_a;
331 BitField<28, 4, BlendFactor> factor_dest_a;
332 } alpha_blending;
333
334 union {
335 enum Op {
336 Set = 4,
337 };
338
339 BitField<0, 4, Op> op;
340 } logic_op;
341
342 INSERT_PADDING_WORDS(0x4);
343
344 union {
345 BitField< 0, 1, u32> depth_test_enable;
346 BitField< 4, 3, DepthFunc> depth_test_func;
347 BitField<12, 1, u32> depth_write_enable;
348 };
349
350 INSERT_PADDING_WORDS(0x8);
351 } output_merger;
352
353 struct {
301 enum ColorFormat : u32 { 354 enum ColorFormat : u32 {
302 RGBA8 = 0, 355 RGBA8 = 0,
303 RGB8 = 1, 356 RGB8 = 1,
@@ -623,6 +676,7 @@ struct Regs {
623 ADD_FIELD(tev_stage3); 676 ADD_FIELD(tev_stage3);
624 ADD_FIELD(tev_stage4); 677 ADD_FIELD(tev_stage4);
625 ADD_FIELD(tev_stage5); 678 ADD_FIELD(tev_stage5);
679 ADD_FIELD(output_merger);
626 ADD_FIELD(framebuffer); 680 ADD_FIELD(framebuffer);
627 ADD_FIELD(vertex_attributes); 681 ADD_FIELD(vertex_attributes);
628 ADD_FIELD(index_array); 682 ADD_FIELD(index_array);
@@ -695,6 +749,7 @@ ASSERT_REG_POSITION(tev_stage2, 0xd0);
695ASSERT_REG_POSITION(tev_stage3, 0xd8); 749ASSERT_REG_POSITION(tev_stage3, 0xd8);
696ASSERT_REG_POSITION(tev_stage4, 0xf0); 750ASSERT_REG_POSITION(tev_stage4, 0xf0);
697ASSERT_REG_POSITION(tev_stage5, 0xf8); 751ASSERT_REG_POSITION(tev_stage5, 0xf8);
752ASSERT_REG_POSITION(output_merger, 0x100);
698ASSERT_REG_POSITION(framebuffer, 0x110); 753ASSERT_REG_POSITION(framebuffer, 0x110);
699ASSERT_REG_POSITION(vertex_attributes, 0x200); 754ASSERT_REG_POSITION(vertex_attributes, 0x200);
700ASSERT_REG_POSITION(index_array, 0x227); 755ASSERT_REG_POSITION(index_array, 0x227);