mirror of
https://github.com/xemu-project/nxdk_pgraph_tests.git
synced 2024-11-23 10:09:40 +00:00
Fixes clang format control comments. (#121)
This commit is contained in:
parent
2f7eb7e28c
commit
2431c96d73
@ -5,9 +5,9 @@
|
||||
void PixelShaderProgram::LoadTexturedPixelShader() {
|
||||
uint32_t *p = pb_begin();
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
#include "textured_pixelshader.inl"
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
pb_end(p);
|
||||
}
|
||||
@ -15,9 +15,9 @@ void PixelShaderProgram::LoadTexturedPixelShader() {
|
||||
void PixelShaderProgram::LoadUntexturedPixelShader() {
|
||||
uint32_t *p = pb_begin();
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
#include "untextured_pixelshader.inl"
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
pb_end(p);
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <pbkit/pbkit.h>
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr uint32_t k2ComponentTexcoords[] = {
|
||||
#include "precalculated_vertex_shader_2c_texcoords.inl"
|
||||
};
|
||||
@ -10,7 +10,7 @@ static constexpr uint32_t k2ComponentTexcoords[] = {
|
||||
static constexpr uint32_t k4ComponentTexcoords[] = {
|
||||
#include "precalculated_vertex_shader_4c_texcoords.inl"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
void PrecalculatedVertexShader::OnLoadShader() {
|
||||
const uint32_t *shader;
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
using namespace XboxMath;
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr uint32_t kVertexShaderLighting[] = {
|
||||
#include "projection_vertex_shader.inl"
|
||||
};
|
||||
@ -25,7 +25,7 @@ static constexpr uint32_t kVertexShaderNoLighting[] = {
|
||||
static constexpr uint32_t kVertexShaderNoLighting4ComponentTexcoord[] = {
|
||||
#include "projection_vertex_shader_no_lighting_4c_texcoords.inl"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
ProjectionVertexShader::ProjectionVertexShader(uint32_t framebuffer_width, uint32_t framebuffer_height, float z_min,
|
||||
float z_max, bool enable_lighting, bool use_4_component_texcoords)
|
||||
|
@ -1,9 +1,9 @@
|
||||
#include "test_host.h"
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
#define _USE_MATH_DEFINES
|
||||
#include <cmath>
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
#include <SDL.h>
|
||||
#include <SDL_image.h>
|
||||
|
@ -8,11 +8,11 @@
|
||||
#include "shaders/precalculated_vertex_shader.h"
|
||||
#include "vertex_buffer.h"
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr uint32_t kShader[] = {
|
||||
#include "attribute_carryover_test.inl"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
static const TestHost::DrawPrimitive kPrimitives[] = {
|
||||
TestHost::PRIMITIVE_LINES,
|
||||
|
@ -8,11 +8,11 @@
|
||||
#include "shaders/precalculated_vertex_shader.h"
|
||||
#include "vertex_buffer.h"
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr uint32_t kShader[] = {
|
||||
#include "attribute_explicit_setter_tests.inl"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
static constexpr AttributeExplicitSetterTests::TestConfig kTestConfigs[] = {
|
||||
{"Setters-alpha", false},
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "pbkit_ext.h"
|
||||
#include "shaders/precalculated_vertex_shader.h"
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const std::vector<uint32_t> passthrough{
|
||||
#include "precalculated_vertex_shader_4c_texcoords.inl"
|
||||
};
|
||||
@ -15,7 +15,7 @@ static const std::vector<uint32_t> passthrough{
|
||||
static const std::vector<uint32_t> mulColour{
|
||||
#include "mul_col0_by_const0_vertex_shader.inl"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
// Infinities
|
||||
static constexpr uint32_t posInf = 0x7F800000;
|
||||
|
@ -49,14 +49,14 @@ static constexpr uint32_t kNumPaletteEntries = sizeof(kPalette) / sizeof(kPalett
|
||||
|
||||
static void Draw(TestHost &host, float x, float y) {
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{19.000000f, 15.000000f}, {56.000000f, 29.000000f}, {74.000000f, 77.000000f}, {45.694406f, 101.330152f},
|
||||
{36.000000f, 38.369815f}, {14.000000f, 23.000000f}, {85.000000f, 98.000000f}, {31.000000f, 40.000000f},
|
||||
{98.000000f, 38.000000f}, {17.000000f, 104.000000f}, {78.000000f, 65.000000f}, {31.644774f, 49.000000f},
|
||||
{105.000000f, 11.968842f}, {9.000000f, 40.000000f}, {105.962647f, 76.068491f}, {80.000000f, 87.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POINTS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -68,14 +68,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{196.000000f, 47.000000f}, {194.000000f, 19.000000f}, {182.000000f, 97.000000f}, {106.186250f, 80.000000f},
|
||||
{127.000000f, 94.581630f}, {133.597443f, 13.763389f}, {205.000000f, 62.000000f}, {115.543920f, 16.000000f},
|
||||
{122.000000f, 3.000000f}, {117.062706f, 87.735558f}, {201.000000f, 28.664894f}, {146.114091f, 10.000000f},
|
||||
{205.356591f, 88.000000f}, {125.000000f, 107.000000f}, {190.828953f, 35.510304f}, {163.000000f, 105.956814f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_LINE_LOOP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -87,12 +87,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{265.185925f, 35.000000f}, {249.778838f, 22.523717f}, {310.000000f, 19.000000f},
|
||||
{243.978231f, 47.650185f}, {304.000000f, 37.000000f}, {232.000000f, 102.522615f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLES);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -104,12 +104,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.000000f, 239.000000f}, {0.000000f, 120.000000f}, {52.500000f, 225.400000f},
|
||||
{54.750000f, 175.500000f}, {105.000000f, 239.000000f}, {105.000000f, 120.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUAD_STRIP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -121,12 +121,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{158.500000f, 205.000000f}, {115.545455f, 239.000000f}, {120.318182f, 120.000000f}, {147.045455f, 157.400000f},
|
||||
{158.500000f, 128.500000f}, {166.136364f, 145.500000f}, {204.318182f, 159.100000f}, {209.750000f, 239.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLE_FAN);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -138,12 +138,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{218.000000f, 232.000000f}, {237.772727f, 142.100000f}, {258.772727f, 120.000000f},
|
||||
{302.681818f, 169.300000f}, {317.000000f, 230.500000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POLYGON);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -155,14 +155,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.f, 350.f},
|
||||
{60.f, 340.f},
|
||||
{58.5f, 425.4f},
|
||||
{12.75f, 407.5f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -189,7 +189,7 @@ void EdgeFlagTests::Test(const std::string &name, bool edge_flag) {
|
||||
|
||||
// Triangles, quads, and polygons can have the flag toggled during the draw action to hide specific lines.
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{365.185925f, 35.000000f},
|
||||
{349.778838f, 22.523717f},
|
||||
@ -199,7 +199,7 @@ void EdgeFlagTests::Test(const std::string &name, bool edge_flag) {
|
||||
{404.f, 37.f},
|
||||
{332.f, 103.f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_TRIANGLES);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -214,11 +214,11 @@ void EdgeFlagTests::Test(const std::string &name, bool edge_flag) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{320.f, 232.0f}, {340.f, 142.1f}, {361.f, 120.0f}, {405.f, 169.3f}, {419.f, 230.5f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_POLYGON);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -233,14 +233,14 @@ void EdgeFlagTests::Test(const std::string &name, bool edge_flag) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{100.f, 350.f},
|
||||
{160.f, 340.f},
|
||||
{158.5f, 425.4f},
|
||||
{112.75f, 407.5f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
|
@ -234,11 +234,11 @@ void FogCustomShaderTests::Initialize() {
|
||||
|
||||
// FogInfiniteFogCoordinateTests
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const uint32_t kInfiniteFogCShader[] = {
|
||||
#include "fog_infinite_fogc_test.vshinc"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
FogInfiniteFogCoordinateTests::FogInfiniteFogCoordinateTests(TestHost& host, std::string output_dir)
|
||||
: FogCustomShaderTests(host, std::move(output_dir), "Fog inf coord") {}
|
||||
@ -255,7 +255,7 @@ void FogInfiniteFogCoordinateTests::Initialize() {
|
||||
|
||||
// FogVec4CoordTests
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const uint32_t kFogVec4Unset[] = {
|
||||
#include "fog_vec4_unset.vshinc"
|
||||
};
|
||||
@ -317,11 +317,11 @@ static const uint32_t kFogVec4YZW[] = {
|
||||
static const uint32_t kFogVec4ZW[] = {
|
||||
#include "fog_vec4_zw.vshinc"
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
#define DEF_SHADER(shader) (shader), sizeof(shader)
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const FogVec4CoordTests::TestConfig kFogWTests[] = {
|
||||
{"W", DEF_SHADER(kFogVec4W), {0.0f, 0.25f, 0.0f, 0.0f}},
|
||||
{"W", DEF_SHADER(kFogVec4W), {0.5f, 0.5f, 0.0f, 0.0f}},
|
||||
@ -378,7 +378,7 @@ static const FogVec4CoordTests::TestConfig kFogWTests[] = {
|
||||
{"ZW", DEF_SHADER(kFogVec4ZW), {0.0f, 0.0f, 0.75f, 1.0f}},
|
||||
{"ZW", DEF_SHADER(kFogVec4ZW), {0.0f, 0.0f, 0.33f, 0.0f}},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
#undef DEF_TEST
|
||||
|
||||
|
@ -113,7 +113,7 @@ void LightingTwoSidedTests::Test() {
|
||||
static constexpr float z = -1.f;
|
||||
// Front face
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{-1.5f, 0.1f},
|
||||
{-1.25f, 1.5f},
|
||||
@ -121,7 +121,7 @@ void LightingTwoSidedTests::Test() {
|
||||
{-0.25f, 0.1f},
|
||||
};
|
||||
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
host_.SetNormal(0.f, 0.f, 1.f);
|
||||
for (auto pt : kVertices) {
|
||||
@ -132,7 +132,7 @@ void LightingTwoSidedTests::Test() {
|
||||
|
||||
// Back face
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.25f, 0.1f},
|
||||
{1.25f, 0.1f},
|
||||
@ -140,7 +140,7 @@ void LightingTwoSidedTests::Test() {
|
||||
{0.1f, 1.5f},
|
||||
};
|
||||
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
host_.SetNormal(0.f, 0.f, -1.f);
|
||||
for (auto pt : kVertices) {
|
||||
@ -157,7 +157,7 @@ void LightingTwoSidedTests::Test() {
|
||||
|
||||
// Front face
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{-1.5f, -1.5f},
|
||||
{-1.25f, -0.1f},
|
||||
@ -165,7 +165,7 @@ void LightingTwoSidedTests::Test() {
|
||||
{-0.25f, -1.5f},
|
||||
};
|
||||
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
host_.SetNormal(0.f, 0.f, 1.f);
|
||||
for (auto pt : kVertices) {
|
||||
@ -176,7 +176,7 @@ void LightingTwoSidedTests::Test() {
|
||||
|
||||
// Back face
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.25f, -1.5f},
|
||||
{1.25f, -1.5f},
|
||||
@ -184,7 +184,7 @@ void LightingTwoSidedTests::Test() {
|
||||
{0.1f, -0.1f},
|
||||
};
|
||||
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host_.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
host_.SetNormal(0.f, 0.f, -1.f);
|
||||
for (auto pt : kVertices) {
|
||||
|
@ -101,14 +101,14 @@ static constexpr uint32_t kNumPaletteEntries = sizeof(kPalette) / sizeof(kPalett
|
||||
|
||||
static void Draw(TestHost &host, float x, float y) {
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{19.000000f, 15.000000f}, {56.000000f, 29.000000f}, {74.000000f, 77.000000f}, {45.694406f, 101.330152f},
|
||||
{36.000000f, 38.369815f}, {14.000000f, 23.000000f}, {85.000000f, 98.000000f}, {31.000000f, 40.000000f},
|
||||
{98.000000f, 38.000000f}, {17.000000f, 104.000000f}, {78.000000f, 65.000000f}, {31.644774f, 49.000000f},
|
||||
{105.000000f, 11.968842f}, {9.000000f, 40.000000f}, {105.962647f, 76.068491f}, {80.000000f, 87.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POINTS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -120,14 +120,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{196.000000f, 47.000000f}, {194.000000f, 19.000000f}, {182.000000f, 97.000000f}, {106.186250f, 80.000000f},
|
||||
{127.000000f, 94.581630f}, {133.597443f, 13.763389f}, {205.000000f, 62.000000f}, {115.543920f, 16.000000f},
|
||||
{122.000000f, 3.000000f}, {117.062706f, 87.735558f}, {201.000000f, 28.664894f}, {146.114091f, 10.000000f},
|
||||
{205.356591f, 88.000000f}, {125.000000f, 107.000000f}, {190.828953f, 35.510304f}, {163.000000f, 105.956814f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_LINE_LOOP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -139,12 +139,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{265.185925f, 35.000000f}, {249.778838f, 22.523717f}, {310.000000f, 19.000000f},
|
||||
{243.978231f, 47.650185f}, {304.000000f, 37.000000f}, {232.000000f, 102.522615f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLES);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -156,12 +156,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.000000f, 239.000000f}, {0.000000f, 120.000000f}, {52.500000f, 225.400000f},
|
||||
{54.750000f, 175.500000f}, {105.000000f, 239.000000f}, {105.000000f, 120.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUAD_STRIP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -173,12 +173,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{158.500000f, 205.000000f}, {115.545455f, 239.000000f}, {120.318182f, 120.000000f}, {147.045455f, 157.400000f},
|
||||
{158.500000f, 128.500000f}, {166.136364f, 145.500000f}, {204.318182f, 159.100000f}, {209.750000f, 239.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLE_FAN);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -190,12 +190,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{218.000000f, 232.000000f}, {237.772727f, 142.100000f}, {258.772727f, 120.000000f},
|
||||
{302.681818f, 169.300000f}, {317.000000f, 230.500000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POLYGON);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -207,14 +207,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.f, 350.f},
|
||||
{60.f, 340.f},
|
||||
{58.5f, 425.4f},
|
||||
{12.75f, 407.5f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
|
@ -7,12 +7,12 @@
|
||||
#include "test_host.h"
|
||||
#include "vertex_buffer.h"
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr uint32_t kSmoothControlValues[] = {
|
||||
0xFFFF0000,
|
||||
0xFFFF0001,
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
static std::string MakeTestName(uint32_t smooth_control) {
|
||||
char buf[64] = {0};
|
||||
@ -40,20 +40,13 @@ void SmoothingTests::Initialize() {
|
||||
}
|
||||
|
||||
static constexpr uint32_t kPalette[] = {
|
||||
0xFFFF3333,
|
||||
0xFF33FF33,
|
||||
0xFF3333FF,
|
||||
0xFFFFFF33,
|
||||
0xFF33FFFF,
|
||||
0xFFFF33FF,
|
||||
0xFF808080,
|
||||
0xFFFFFFFF,
|
||||
0xFFFF3333, 0xFF33FF33, 0xFF3333FF, 0xFFFFFF33, 0xFF33FFFF, 0xFFFF33FF, 0xFF808080, 0xFFFFFFFF,
|
||||
};
|
||||
static constexpr uint32_t kNumPaletteEntries = sizeof(kPalette) / sizeof(kPalette[0]);
|
||||
|
||||
static void Draw(TestHost& host, float x, float y) {
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{19.000000f, 15.000000f},
|
||||
{56.000000f, 29.000000f},
|
||||
@ -72,7 +65,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{105.962647f, 76.068491f},
|
||||
{80.000000f, 87.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POINTS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -84,7 +77,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{196.000000f, 47.000000f},
|
||||
{194.000000f, 19.000000f},
|
||||
@ -103,7 +96,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{190.828953f, 35.510304f},
|
||||
{163.000000f, 105.956814f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_LINE_LOOP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -115,7 +108,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{265.185925f, 35.000000f},
|
||||
{249.778838f, 22.523717f},
|
||||
@ -124,7 +117,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{304.000000f, 37.000000f},
|
||||
{232.000000f, 102.522615f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLES);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -136,7 +129,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.000000f, 239.000000f},
|
||||
{0.000000f, 120.000000f},
|
||||
@ -145,7 +138,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{105.000000f, 239.000000f},
|
||||
{105.000000f, 120.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUAD_STRIP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -157,7 +150,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{158.500000f, 205.000000f},
|
||||
{115.545455f, 239.000000f},
|
||||
@ -168,7 +161,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{204.318182f, 159.100000f},
|
||||
{209.750000f, 239.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLE_FAN);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -180,7 +173,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{218.000000f, 232.000000f},
|
||||
{237.772727f, 142.100000f},
|
||||
@ -188,7 +181,7 @@ static void Draw(TestHost& host, float x, float y) {
|
||||
{302.681818f, 169.300000f},
|
||||
{317.000000f, 230.500000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POLYGON);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
|
@ -81,14 +81,14 @@ static constexpr uint32_t kNumPaletteEntries = sizeof(kPalette) / sizeof(kPalett
|
||||
|
||||
static void Draw(TestHost &host, float x, float y) {
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{19.000000f, 15.000000f}, {56.000000f, 29.000000f}, {74.000000f, 77.000000f}, {45.694406f, 101.330152f},
|
||||
{36.000000f, 38.369815f}, {14.000000f, 23.000000f}, {85.000000f, 98.000000f}, {31.000000f, 40.000000f},
|
||||
{98.000000f, 38.000000f}, {17.000000f, 104.000000f}, {78.000000f, 65.000000f}, {31.644774f, 49.000000f},
|
||||
{105.000000f, 11.968842f}, {9.000000f, 40.000000f}, {105.962647f, 76.068491f}, {80.000000f, 87.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POINTS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -100,14 +100,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{196.000000f, 47.000000f}, {194.000000f, 19.000000f}, {182.000000f, 97.000000f}, {106.186250f, 80.000000f},
|
||||
{127.000000f, 94.581630f}, {133.597443f, 13.763389f}, {205.000000f, 62.000000f}, {115.543920f, 16.000000f},
|
||||
{122.000000f, 3.000000f}, {117.062706f, 87.735558f}, {201.000000f, 28.664894f}, {146.114091f, 10.000000f},
|
||||
{205.356591f, 88.000000f}, {125.000000f, 107.000000f}, {190.828953f, 35.510304f}, {163.000000f, 105.956814f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_LINE_LOOP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -119,12 +119,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{265.185925f, 35.000000f}, {249.778838f, 22.523717f}, {310.000000f, 19.000000f},
|
||||
{243.978231f, 47.650185f}, {304.000000f, 37.000000f}, {232.000000f, 102.522615f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLES);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -136,12 +136,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.000000f, 239.000000f}, {0.000000f, 120.000000f}, {52.500000f, 225.400000f},
|
||||
{54.750000f, 175.500000f}, {105.000000f, 239.000000f}, {105.000000f, 120.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUAD_STRIP);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -153,12 +153,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{158.500000f, 205.000000f}, {115.545455f, 239.000000f}, {120.318182f, 120.000000f}, {147.045455f, 157.400000f},
|
||||
{158.500000f, 128.500000f}, {166.136364f, 145.500000f}, {204.318182f, 159.100000f}, {209.750000f, 239.000000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_TRIANGLE_FAN);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -170,12 +170,12 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{218.000000f, 232.000000f}, {237.772727f, 142.100000f}, {258.772727f, 120.000000f},
|
||||
{302.681818f, 169.300000f}, {317.000000f, 230.500000f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_POLYGON);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
@ -187,14 +187,14 @@ static void Draw(TestHost &host, float x, float y) {
|
||||
}
|
||||
|
||||
{
|
||||
// clang format off
|
||||
// clang-format off
|
||||
constexpr float kVertices[][2] = {
|
||||
{0.f, 350.f},
|
||||
{60.f, 340.f},
|
||||
{58.5f, 425.4f},
|
||||
{12.75f, 407.5f},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
host.Begin(TestHost::PRIMITIVE_QUADS);
|
||||
uint32_t i = 0;
|
||||
for (auto pt : kVertices) {
|
||||
|
@ -13,7 +13,7 @@ static constexpr uint32_t kDefaultDMAColorChannel = 9;
|
||||
|
||||
static constexpr float kTestRectThickness = 4.0f;
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr SurfaceClipTests::ClipRect kTestRects[] = {
|
||||
{0, 0, 0, 0},
|
||||
// Using a zero sized clip that is offset leads to a buffer limit error while clearing on HW but is ignored on xemu.
|
||||
@ -27,7 +27,7 @@ static constexpr SurfaceClipTests::ClipRect kTestRects[] = {
|
||||
// The extents must stay within the surface size to avoid a buffer limit error on HW.
|
||||
{8, 16, 640 - 8, 480 - 16},
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
static constexpr const char kXemuBug420Test[] = "XemuBug420";
|
||||
|
||||
|
@ -35,12 +35,12 @@ static constexpr const char *kXemu1034 = "xemu#1034";
|
||||
|
||||
static constexpr uint32_t kDepthSlices = 4;
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static constexpr const uint32_t kBorderTextureSizes[][2] = {
|
||||
{1, 1}, {2, 2}, {4, 4}, {8, 8}, {16, 16}, {32, 32}, {16, 1}, {8, 2}, {4, 8},
|
||||
};
|
||||
static constexpr const uint32_t kNumBorderTextureSizes = sizeof(kBorderTextureSizes) / sizeof(kBorderTextureSizes[0]);
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
// Must be ordered to match kCubeSTPoints for each face.
|
||||
static constexpr uint32_t kRightSide[] = {3, 7, 6, 2};
|
||||
|
@ -31,13 +31,13 @@ static constexpr float kZFar = kCameraZ + 200.0f;
|
||||
// Used to determine the tests around the end and mid/quarter points in projection tests.
|
||||
static constexpr float kEpsilon = 0.0125f;
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const uint32_t kCompareFuncs[] = {
|
||||
NV097_SET_SHADOW_COMPARE_FUNC_NEVER, NV097_SET_SHADOW_COMPARE_FUNC_GREATER, NV097_SET_SHADOW_COMPARE_FUNC_EQUAL,
|
||||
NV097_SET_SHADOW_COMPARE_FUNC_GEQUAL, NV097_SET_SHADOW_COMPARE_FUNC_LESS, NV097_SET_SHADOW_COMPARE_FUNC_NOTEQUAL,
|
||||
NV097_SET_SHADOW_COMPARE_FUNC_LEQUAL, NV097_SET_SHADOW_COMPARE_FUNC_ALWAYS,
|
||||
};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
struct BoxLayoutInfo {
|
||||
uint32_t box_width;
|
||||
|
@ -16,7 +16,7 @@ static constexpr const char kTestName[] = "MAC_ILU_Independence";
|
||||
// The expected behavior is that the diffuse blue component is entirely determined by the C0 uniform with the rest of
|
||||
// the components determined by C1.
|
||||
|
||||
// clang format off
|
||||
// clang-format off
|
||||
static const uint32_t kShader[] = {
|
||||
// mov oPos, v0
|
||||
0x00000000, 0x0020001b, 0x0836106c, 0x2070f800,
|
||||
@ -47,7 +47,7 @@ static const uint32_t kShader[] = {
|
||||
|
||||
// mov oD0, r1
|
||||
0x00000000, 0x0020001b, 0x1436106c, 0x2070f819};
|
||||
// clang format on
|
||||
// clang-format on
|
||||
|
||||
VertexShaderIndependenceTests::VertexShaderIndependenceTests(TestHost &host, std::string output_dir)
|
||||
: TestSuite(host, std::move(output_dir), "Vertex shader independence tests") {
|
||||
|
Loading…
Reference in New Issue
Block a user