Skip to content

Instantly share code, notes, and snippets.

View Subv's full-sized avatar

Sebastian Valle Subv

  • Barranquilla, Colombia
View GitHub Profile
diff --git a/src/video_core/clipper.cpp b/src/video_core/clipper.cpp
index ea3367e..ba3876a 100644
--- a/src/video_core/clipper.cpp
+++ b/src/video_core/clipper.cpp
@@ -16,7 +16,10 @@ namespace Clipper {
struct ClippingEdge {
public:
ClippingEdge(Math::Vec4<float24> coeffs,
- Math::Vec4<float24> bias = Math::Vec4<float24>(float24::FromFloat32(0), float24::FromFloat32(0), float24::FromFloat32(0), float24::FromFloat32(0)))
+ Math::Vec4<float24> bias = Math::Vec4<float24>(float24::FromFloat32(0),
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp
index def868a..3a08216 100644
--- a/src/video_core/vertex_shader.cpp
+++ b/src/video_core/vertex_shader.cpp
@@ -90,6 +90,7 @@ struct VertexShaderState {
u8 repeat_counter; // How often to repeat until this call stack element is removed
u8 loop_increment; // Which value to add to the loop counter after an iteration
// TODO: Should this be a signed value? Does it even matter?
+ u32 loop_address; // The address where we'll return to after each iteration
};
diff --git a/Makefile b/Makefile
index 61f45d3..7d2293e 100644
--- a/Makefile
+++ b/Makefile
@@ -15,22 +15,30 @@ include $(DEVKITARM)/3ds_rules
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
-# SPECS is the directory containing the important build and link files
-#---------------------------------------------------------------------------------
#include <limits>
#include <string.h>
#include "output.h"
#include "common/scope_exit.h"
#include "common/string_funcs.h"
#include "tests/test.h"
#include "tests/gpu/displaytransfer.h"
namespace GPU {
namespace DisplayTransfer {
#include <limits>
#include <string>
#include "output.h"
#include "common/scope_exit.h"
#include "common/string_funcs.h"
#include "tests/test.h"
#include "tests/gpu/displaytransfer.h"
namespace GPU {
namespace DisplayTransfer {
template<typename T1, typename T2>
static void DisplayTransferAndWait(T1* input, T2* output, u32 input_dimensions, u32 output_dimensions, u32 flags) {
GSPGPU_FlushDataCache(NULL, (u8*)input, sizeof(T1));
GSPGPU_InvalidateDataCache(NULL, (u8*)output, sizeof(T2));
GX_SetDisplayTransfer(NULL, (u32*)input, input_dimensions, (u32*)output, output_dimensions, flags | RAW_COPY_FLAG);
//gspWaitForPPF();
svcSleepThread(1000 * 1000 * 1000); // 1 second
}
#include <limits>
#include <string.h>
#include "output.h"
#include "common/scope_exit.h"
#include "common/string_funcs.h"
#include "tests/test.h"
#include "tests/gpu/displaytransfer.h"
namespace GPU {
namespace DisplayTransfer {
#include <limits>
#include <string.h>
#include "output.h"
#include "common/scope_exit.h"
#include "common/string_funcs.h"
#include "tests/test.h"
#include "tests/gpu/displaytransfer.h"
namespace GPU {
namespace DisplayTransfer {
static bool RGBA8_To_RGBA8_Scaled(u32* input, u32* output) {
memset(output, 0, 0x4000 * 4);
memset(input, 0, 0x4000 * 4);
//Test Red Input
*input = 0xFF000000; //Input
*output = 0; //Output
DisplayTransferAndWait(input, output, Dimensions(0x40, 0x40), Dimensions(0x80, 0x80), IN_RGBA8 | OUT_RGBA8);
TestEquals(*output, (u32)0xFF000000);
TestEquals(output[1], 0);
//Test Red Input
*input = 0xFFFF0000; //Input
input[1] = 0x00FF0000; //Input
input[2] = 0xFF000000;
*output = 0; //Output
DisplayTransferAndWait(input, output, Dimensions(0x80, 0x80), Dimensions(0x40, 0x40), IN_RGBA8 | OUT_RGBA8 | (1 << 24));
Log(GFX_BOTTOM, Common::FormatString("Got 0: %08X and 1: %08X\r\n", *output, output[1]));
input[1] = 0;
input[2] = 0;
TestEquals(*output, (u32)0x7FFF0000);