summaryrefslogtreecommitdiffstats
path: root/src/video_core/debug_utils
diff options
context:
space:
mode:
authorTony Wasserka <NeoBrainX@gmail.com>2015-05-27 16:20:46 +0200
committerTony Wasserka <NeoBrainX@gmail.com>2015-08-16 13:22:00 +0200
commit4cb302c8aeb86bdb7c7bd6f9e5d716e140868075 (patch)
tree3aebbc2a55c68a48cbf72bcf7652485c1ac9b745 /src/video_core/debug_utils
parentcitra-qt: Print the correct swizzle mask for SRC2 in the shader disassembler. (diff)
downloadyuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar.gz
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar.bz2
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar.lz
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar.xz
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.tar.zst
yuzu-4cb302c8aeb86bdb7c7bd6f9e5d716e140868075.zip
Diffstat (limited to 'src/video_core/debug_utils')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp23
-rw-r--r--src/video_core/debug_utils/debug_utils.h1
2 files changed, 17 insertions, 7 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 572b4fd62..7cb7a6ef4 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -131,11 +131,14 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
// into shbin format (separate type and component mask).
union OutputRegisterInfo {
enum Type : u64 {
- POSITION = 0,
- COLOR = 2,
- TEXCOORD0 = 3,
- TEXCOORD1 = 5,
- TEXCOORD2 = 6,
+ POSITION = 0,
+ QUATERNION = 1,
+ COLOR = 2,
+ TEXCOORD0 = 3,
+ TEXCOORD1 = 5,
+ TEXCOORD2 = 6,
+
+ VIEW = 8,
};
BitField< 0, 64, u64> hex;
@@ -157,6 +160,10 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
{ OutputAttributes::POSITION_Y, { OutputRegisterInfo::POSITION, 2} },
{ OutputAttributes::POSITION_Z, { OutputRegisterInfo::POSITION, 4} },
{ OutputAttributes::POSITION_W, { OutputRegisterInfo::POSITION, 8} },
+ { OutputAttributes::QUATERNION_X, { OutputRegisterInfo::QUATERNION, 1} },
+ { OutputAttributes::QUATERNION_Y, { OutputRegisterInfo::QUATERNION, 2} },
+ { OutputAttributes::QUATERNION_Z, { OutputRegisterInfo::QUATERNION, 4} },
+ { OutputAttributes::QUATERNION_W, { OutputRegisterInfo::QUATERNION, 8} },
{ OutputAttributes::COLOR_R, { OutputRegisterInfo::COLOR, 1} },
{ OutputAttributes::COLOR_G, { OutputRegisterInfo::COLOR, 2} },
{ OutputAttributes::COLOR_B, { OutputRegisterInfo::COLOR, 4} },
@@ -166,7 +173,10 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
{ OutputAttributes::TEXCOORD1_U, { OutputRegisterInfo::TEXCOORD1, 1} },
{ OutputAttributes::TEXCOORD1_V, { OutputRegisterInfo::TEXCOORD1, 2} },
{ OutputAttributes::TEXCOORD2_U, { OutputRegisterInfo::TEXCOORD2, 1} },
- { OutputAttributes::TEXCOORD2_V, { OutputRegisterInfo::TEXCOORD2, 2} }
+ { OutputAttributes::TEXCOORD2_V, { OutputRegisterInfo::TEXCOORD2, 2} },
+ { OutputAttributes::VIEW_X, { OutputRegisterInfo::VIEW, 1} },
+ { OutputAttributes::VIEW_Y, { OutputRegisterInfo::VIEW, 2} },
+ { OutputAttributes::VIEW_Z, { OutputRegisterInfo::VIEW, 4} }
};
for (const auto& semantic : std::vector<OutputAttributes::Semantic>{
@@ -239,6 +249,7 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data
// TODO: Create a label table for "main"
+ // TODO: Write uniforms as constants
// Write data to file
static int dump_index = 0;
diff --git a/src/video_core/debug_utils/debug_utils.h b/src/video_core/debug_utils/debug_utils.h
index 81eea30a9..4939e6c06 100644
--- a/src/video_core/debug_utils/debug_utils.h
+++ b/src/video_core/debug_utils/debug_utils.h
@@ -158,7 +158,6 @@ extern std::shared_ptr<DebugContext> g_debug_context; // TODO: Get rid of this g
namespace DebugUtils {
#define PICA_DUMP_GEOMETRY 0
-#define PICA_DUMP_SHADERS 0
#define PICA_DUMP_TEXTURES 0
#define PICA_LOG_TEV 0