| 1 | #pragma once |
| 2 | |
| 3 | #include <nn/gfx/detail/gfx_Misc.h> |
| 4 | #include <nn/gfx/gfx_Common.h> |
| 5 | #include <nn/nn_BitTypes.h> |
| 6 | #include <nn/util/util_BitPack.h> |
| 7 | |
| 8 | namespace nn::gfx { |
| 9 | |
| 10 | template <> |
| 11 | struct RasterizerStateImplData<ApiVariationNvn8> { |
| 12 | enum Flag { |
| 13 | Flag_MultisampleEnabled, |
| 14 | Flag_DepthClipEnabled, |
| 15 | Flag_RasterEnabled, |
| 16 | Flag_ConservativeRasterEnabled |
| 17 | }; |
| 18 | |
| 19 | enum State { State_NotInitialized, State_Initialized }; |
| 20 | |
| 21 | Bit32 nvnPolygonState; |
| 22 | char nvnMultisampleState[24]; |
| 23 | Bit32 nvnSampleMask; |
| 24 | float nvnDepthBias; |
| 25 | float nvnDepthBiasClamp; |
| 26 | float nvnSlopeScaledDepthBias; |
| 27 | Bit8 state; |
| 28 | nn::util::BitPack8 flags; |
| 29 | char reserved[2]; |
| 30 | }; |
| 31 | |
| 32 | template <> |
| 33 | struct BlendStateImplData<ApiVariationNvn8> { |
| 34 | enum State { State_NotInitialized, State_Initialized }; |
| 35 | |
| 36 | detail::Ptr<void> pNvnBlendStateData; |
| 37 | Bit32 nvnColorState; |
| 38 | Bit32 nvnChannelMaskState; |
| 39 | float nvnBlendConstant[4]; |
| 40 | Bit32 memorySize; |
| 41 | Bit8 state; |
| 42 | Bit8 targetCount; |
| 43 | char reserved[2]; |
| 44 | }; |
| 45 | |
| 46 | template <> |
| 47 | struct DepthStencilStateImplData<ApiVariationNvn8> { |
| 48 | enum Flag { Flag_DepthBoundsTestEnable = 3 }; |
| 49 | |
| 50 | enum State { State_NotInitialized, State_Initialized }; |
| 51 | |
| 52 | char nvnDepthStencilState[8]; |
| 53 | Bit32 nvnStencilValueMask; |
| 54 | Bit32 nvnStencilMask; |
| 55 | Bit32 nvnStencilBackRef; |
| 56 | Bit32 nvnStencilFrontRef; |
| 57 | Bit8 state; |
| 58 | char reserved; |
| 59 | nn::util::BitPack16 flag; |
| 60 | }; |
| 61 | |
| 62 | template <> |
| 63 | struct VertexStateImplData<ApiVariationNvn8> { |
| 64 | enum State { State_NotInitialized, State_Initialized }; |
| 65 | |
| 66 | Bit8 state; |
| 67 | char reserved[3]; |
| 68 | int32_t vertexStreamStateCount; |
| 69 | int32_t vertexAttributeStateCount; |
| 70 | uint32_t memorySize; |
| 71 | detail::Ptr<void> pNvnVertexStreamState; |
| 72 | detail::Ptr<void> pNvnVertexAttribState; |
| 73 | }; |
| 74 | |
| 75 | template <> |
| 76 | struct TessellationStateImplData<ApiVariationNvn8> { |
| 77 | enum State { State_NotInitialized, State_Initialized }; |
| 78 | |
| 79 | Bit8 state; |
| 80 | char reserved[3]; |
| 81 | uint32_t patchSize; |
| 82 | }; |
| 83 | |
| 84 | template <> |
| 85 | struct ViewportScissorStateImplData<ApiVariationNvn8> { |
| 86 | enum State { State_NotInitialized, State_Initialized }; |
| 87 | |
| 88 | detail::Ptr<void> pWorkMemory; |
| 89 | int32_t viewportCount; |
| 90 | uint32_t memorySize; |
| 91 | float viewport[4]; |
| 92 | double depthRange[2]; |
| 93 | int32_t scissor[4]; |
| 94 | Bit8 state; |
| 95 | nn::util::BitPack8 flag; |
| 96 | char reserved[2]; |
| 97 | }; |
| 98 | |
| 99 | } // namespace nn::gfx |