nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
pvideo_control.h
1#ifndef NXDK_PGRAPH_TESTS_SRC_PVIDEO_CONTROLLER_H_
2#define NXDK_PGRAPH_TESTS_SRC_PVIDEO_CONTROLLER_H_
3
4#include <cstdint>
5
6namespace PvideoControl {
7
8void PvideoInit();
9
10void PvideoTeardown();
11
13void ClearPvideoInterrupts();
14
21void SetPvideoInterruptEnabled(bool enable_buffer_zero, bool enable_buffer_one);
22
31void SetPvideoBuffer(bool enable_buffer_zero, bool enable_buffer_one);
32
33void SetPvideoStop(uint32_t value = 0);
34
40void SetPvideoBase(uint32_t addr, uint32_t buffer = 0);
41
42void SetPvideoLimit(uint32_t limit, uint32_t buffer = 0);
43
49void SetPvideoOffset(uint32_t offset, uint32_t buffer = 0);
50
60void SetPvideoIn(uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t buffer = 0);
61
73void SetPvideoOut(uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t buffer = 0);
74
84void SetPvideoFormat(uint32_t format, uint32_t pitch, bool color_keyed, uint32_t buffer = 0);
85
93void SetPvideoColorKey(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 0);
94inline void SetPvideoColorKey(uint32_t color_key) {
95 SetPvideoColorKey(color_key & 0xFF, (color_key >> 8) & 0xFF, (color_key >> 16) & 0xFF, (color_key & 24) & 0xFF);
96}
97
98// TODO: Allow values to be passed.
99void SetPvideoLuminanceChrominance(uint32_t buffer = 0);
100
101void SetDsDx(uint32_t in_width, uint32_t out_width, uint32_t buffer = 0);
102void SetDtDy(uint32_t in_height, uint32_t out_height, uint32_t buffer = 0);
103
105void SetSquareDsDxDtDy(uint32_t buffer = 0);
106
107} // namespace PvideoControl
108
109#endif // NXDK_PGRAPH_TESTS_SRC_PVIDEO_CONTROLLER_H_