diff options
author | Mark Janes <mark.a.janes@intel.com> | 2016-07-26 09:20:32 -0700 |
---|---|---|
committer | Mark Janes <mark.a.janes@intel.com> | 2017-06-19 14:04:46 -0700 |
commit | e0128cc00757b6e3142836fb30a9b81f30a076e9 (patch) | |
tree | c5b1d1a7a6cbb7f45484f4ac8de909350599afa7 /retrace | |
parent | be77b1f82844e872a7a272a30ac1c9cc1214b62a (diff) |
display tesselation control and evaluation shaders
Track both variations of tess shader, and properly handle the parse
delimiters for ir.
Since shaders can be large, show them in a scrollable container.
Diffstat (limited to 'retrace')
-rw-r--r-- | retrace/daemon/glframe_logger.hpp | 2 | ||||
-rw-r--r-- | retrace/daemon/glframe_retrace.cpp | 6 | ||||
-rw-r--r-- | retrace/daemon/glframe_retrace.hpp | 6 | ||||
-rw-r--r-- | retrace/daemon/glframe_retrace_skeleton.cpp | 10 | ||||
-rw-r--r-- | retrace/daemon/glframe_retrace_skeleton.hpp | 6 | ||||
-rw-r--r-- | retrace/daemon/glframe_retrace_stub.cpp | 6 | ||||
-rw-r--r-- | retrace/daemon/glframe_state.cpp | 87 | ||||
-rw-r--r-- | retrace/daemon/glframe_state.hpp | 13 | ||||
-rw-r--r-- | retrace/daemon/glframe_stderr.cpp | 1 | ||||
-rw-r--r-- | retrace/daemon/playback.proto | 4 | ||||
-rw-r--r-- | retrace/daemon/test/retrace_daemon_test.cpp | 6 | ||||
-rw-r--r-- | retrace/daemon/test/retrace_metrics_test.cpp | 6 | ||||
-rw-r--r-- | retrace/daemon/ui/glframe_retrace_model.cpp | 22 | ||||
-rw-r--r-- | retrace/daemon/ui/glframe_retrace_model.hpp | 17 | ||||
-rw-r--r-- | retrace/daemon/ui/qml/mainwin.qml | 277 |
15 files changed, 348 insertions, 121 deletions
diff --git a/retrace/daemon/glframe_logger.hpp b/retrace/daemon/glframe_logger.hpp index c0c74780..1cbfa545 100644 --- a/retrace/daemon/glframe_logger.hpp +++ b/retrace/daemon/glframe_logger.hpp @@ -79,7 +79,7 @@ inline void glretrace_log_message(glretrace::Severity s, const char *file, int line, const char *format, ... ) { - static const int BUF_SIZE = 512; + static const int BUF_SIZE = 16384; char buf[BUF_SIZE]; va_list ap; va_start(ap, format); diff --git a/retrace/daemon/glframe_retrace.cpp b/retrace/daemon/glframe_retrace.cpp index 5bdef5d4..58d97233 100644 --- a/retrace/daemon/glframe_retrace.cpp +++ b/retrace/daemon/glframe_retrace.cpp @@ -212,13 +212,17 @@ FrameRetrace::retraceShaderAssembly(RenderId renderId, callback->onShaderAssembly(renderId, tmp_tracker.currentVertexShader(), tmp_tracker.currentVertexIr(), + tmp_tracker.currentVertexNIR(), + tmp_tracker.currentVertexSSA(), tmp_tracker.currentVertexVec4(), tmp_tracker.currentFragmentShader(), tmp_tracker.currentFragmentIr(), tmp_tracker.currentFragmentSimd8(), tmp_tracker.currentFragmentSimd16(), tmp_tracker.currentFragmentSSA(), - tmp_tracker.currentFragmentNIR()); + tmp_tracker.currentFragmentNIR(), + tmp_tracker.currentTessControlShader(), + tmp_tracker.currentTessEvalShader()); } FrameState::FrameState(const std::string &filename, diff --git a/retrace/daemon/glframe_retrace.hpp b/retrace/daemon/glframe_retrace.hpp index 1fab4fa1..0026874c 100644 --- a/retrace/daemon/glframe_retrace.hpp +++ b/retrace/daemon/glframe_retrace.hpp @@ -173,13 +173,17 @@ class OnFrameRetrace { virtual void onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final) = 0; + const std::string &fragment_nir_final, + const std::string &tess_control_shader, + const std::string &tess_eval_shader) = 0; virtual void onRenderTarget(RenderId renderId, RenderTargetType type, const uvec & pngImageData) = 0; virtual void onMetricList(const std::vector<MetricId> &ids, diff --git a/retrace/daemon/glframe_retrace_skeleton.cpp b/retrace/daemon/glframe_retrace_skeleton.cpp index a718af33..8b032052 100644 --- a/retrace/daemon/glframe_retrace_skeleton.cpp +++ b/retrace/daemon/glframe_retrace_skeleton.cpp @@ -185,17 +185,23 @@ void FrameRetraceSkeleton::onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final) { + const std::string &fragment_nir_final, + const std::string &tess_control_shader, + const std::string &tess_eval_shader) { RetraceResponse proto_response; auto shader = proto_response.mutable_shaderassembly(); shader->set_vertex_shader(vertex_shader); shader->set_vertex_ir(vertex_ir); + shader->set_vertex_nir(vertex_nir); + shader->set_vertex_ssa(vertex_ssa); shader->set_vertex_vec4(vertex_vec4); shader->set_fragment_shader(fragment_shader); shader->set_fragment_ir(fragment_ir); @@ -203,6 +209,8 @@ FrameRetraceSkeleton::onShaderAssembly(RenderId renderId, shader->set_fragment_simd16(fragment_simd16); shader->set_fragment_ssa(fragment_nir_ssa); shader->set_fragment_nir(fragment_nir_final); + shader->set_tess_control_shader(tess_control_shader); + shader->set_tess_eval_shader(tess_eval_shader); writeResponse(m_socket, proto_response, &m_buf); } diff --git a/retrace/daemon/glframe_retrace_skeleton.hpp b/retrace/daemon/glframe_retrace_skeleton.hpp index f45b49e0..c8332f9c 100644 --- a/retrace/daemon/glframe_retrace_skeleton.hpp +++ b/retrace/daemon/glframe_retrace_skeleton.hpp @@ -54,13 +54,17 @@ class FrameRetraceSkeleton : public Thread, virtual void onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final); + const std::string &fragment_nir_final, + const std::string &tess_control_shader, + const std::string &tess_eval_shader); virtual void onFileOpening(bool finished, uint32_t percent_complete); virtual void onRenderTarget(RenderId renderId, RenderTargetType type, diff --git a/retrace/daemon/glframe_retrace_stub.cpp b/retrace/daemon/glframe_retrace_stub.cpp index 7984b176..fad3ef75 100644 --- a/retrace/daemon/glframe_retrace_stub.cpp +++ b/retrace/daemon/glframe_retrace_stub.cpp @@ -167,13 +167,17 @@ class RetraceShaderAssemblyRequest : public IRetraceRequest { RenderId(m_proto_msg.rendertarget().renderid()), shader.vertex_shader(), shader.vertex_ir(), + shader.vertex_nir(), + shader.vertex_ssa(), shader.vertex_vec4(), shader.fragment_shader(), shader.fragment_ir(), shader.fragment_simd8(), shader.fragment_simd16(), shader.fragment_ssa(), - shader.fragment_nir()); + shader.fragment_nir(), + shader.tess_control_shader(), + shader.tess_eval_shader()); } private: diff --git a/retrace/daemon/glframe_state.cpp b/retrace/daemon/glframe_state.cpp index 5ea3c8ce..2a9befc2 100644 --- a/retrace/daemon/glframe_state.cpp +++ b/retrace/daemon/glframe_state.cpp @@ -31,7 +31,8 @@ #include <sstream> #include <string> -#include "GLES2/gl2.h" +#include "GL/gl.h" +#include "GL/glext.h" #include "trace_model.hpp" #include "glframe_glhelper.hpp" #include "glframe_logger.hpp" @@ -110,14 +111,24 @@ StateTrack::trackAttachShader(const Call &call) { program_to_fragment_shader_source[program] = shader_to_source[shader]; else if (shader_to_type[shader] == GL_VERTEX_SHADER) program_to_vertex_shader_source[program] = shader_to_source[shader]; + else if (shader_to_type[shader] == GL_TESS_CONTROL_SHADER) + program_to_tess_control_shader_source[program] = shader_to_source[shader]; + else if (shader_to_type[shader] == GL_TESS_EVALUATION_SHADER) + program_to_tess_eval_shader_source[program] = shader_to_source[shader]; auto vs = program_to_vertex_shader_source.find(program); - if (vs == program_to_vertex_shader_source.end()) - return; auto fs = program_to_fragment_shader_source.find(program); - if (fs == program_to_fragment_shader_source.end()) - return; - m_sources_to_program[ProgramKey(vs->second, fs->second)] = program; + auto tess_control = program_to_tess_control_shader_source.find(program); + auto tess_eval = program_to_tess_eval_shader_source.find(program); + const ProgramKey k(vs == program_to_vertex_shader_source.end() + ? "" : vs->second, + fs == program_to_fragment_shader_source.end() + ? "" : fs->second, + tess_control == program_to_tess_control_shader_source.end() + ? "" : tess_control->second, + tess_eval == program_to_tess_eval_shader_source.end() + ? "" : tess_eval->second); + m_sources_to_program[k] = program; } void @@ -156,7 +167,7 @@ StateTrack::parse() { return; std::string fs_ir, fs_simd8, fs_simd16, vs_ir, vs_vec4, line, - fs_nir_ssa, fs_nir_final, + fs_nir_ssa, fs_nir_final, vs_nir_ssa, vs_nir_final, *current_target = NULL; std::stringstream line_split(output); int line_shader = -1; @@ -166,6 +177,12 @@ StateTrack::parse() { if (matches > 0) current_target = &vs_ir; + if (0 == strcmp(line.c_str(), "NIR (SSA form) for vertex shader:")) + current_target = &vs_nir_ssa; + + if (0 == strcmp(line.c_str(), "NIR (final form) for vertex shader:")) + current_target = &vs_nir_final; + if (0 == strcmp(line.c_str(), "NIR (SSA form) for fragment shader:")) current_target = &fs_nir_ssa; @@ -174,7 +191,7 @@ StateTrack::parse() { if (matches <= 0) { matches = sscanf(line.c_str(), - "Native code for unnamed vertex shader %d:", + "Native code for unnamed vertex shader GLSL%d:", &line_shader); if (matches > 0) current_target = &vs_vec4; @@ -195,7 +212,7 @@ StateTrack::parse() { if (matches <= 0) { int wide; matches = sscanf(line.c_str(), - "Native code for unnamed fragment shader %d", + "Native code for unnamed fragment shader GLSL%d", &line_shader); if (matches > 0) { if (line_shader != current_program) { @@ -231,6 +248,10 @@ StateTrack::parse() { program_to_fragment_shader_simd16[current_program] = fs_simd16; if (vs_ir.length() > 0) program_to_vertex_shader_ir[current_program] = vs_ir; + if (vs_nir_ssa.length() > 0) + program_to_vertex_shader_ssa[current_program] = vs_nir_ssa; + if (vs_nir_final.length() > 0) + program_to_vertex_shader_nir[current_program] = vs_nir_final; if (vs_vec4.length() > 0) program_to_vertex_shader_vec4[current_program] = vs_vec4; if (fs_nir_final.length() > 0) @@ -248,6 +269,22 @@ StateTrack::currentVertexIr() const { } std::string +StateTrack::currentVertexNIR() const { + auto sh = program_to_vertex_shader_nir.find(current_program); + if (sh == program_to_vertex_shader_nir.end()) + return ""; + return sh->second; +} + +std::string +StateTrack::currentVertexSSA() const { + auto sh = program_to_vertex_shader_ssa.find(current_program); + if (sh == program_to_vertex_shader_ssa.end()) + return ""; + return sh->second; +} + +std::string StateTrack::currentFragmentIr() const { auto sh = program_to_fragment_shader_ir.find(current_program); if (sh == program_to_fragment_shader_ir.end()) @@ -311,12 +348,30 @@ StateTrack::currentFragmentNIR() const { return sh->second; } +std::string +StateTrack::currentTessControlShader() const { + auto sh = program_to_tess_control_shader_source.find(current_program); + if (sh == program_to_tess_control_shader_source.end()) + return ""; + return sh->second; +} + +std::string +StateTrack::currentTessEvalShader() const { + auto sh = program_to_tess_eval_shader_source.find(current_program); + if (sh == program_to_tess_eval_shader_source.end()) + return ""; + return sh->second; +} + void StateTrack::flush() { m_poller->poll(); } StateTrack::ProgramKey::ProgramKey(const std::string &v, - const std::string &f) - : vs(v), fs(f) {} + const std::string &f, + const std::string &t_c, + const std::string &t_e) + : vs(v), fs(f), tess_control(t_c), tess_eval(t_e) {} bool StateTrack::ProgramKey::operator<(const ProgramKey &o) const { @@ -326,6 +381,14 @@ StateTrack::ProgramKey::operator<(const ProgramKey &o) const { return false; if (fs < o.fs) return true; + if (fs > o.fs) + return false; + if (tess_control < o.tess_control) + return true; + if (tess_control > o.tess_control) + return false; + if (tess_eval < o.tess_eval) + return true; return false; } @@ -333,7 +396,7 @@ int StateTrack::useProgram(const std::string &vs, const std::string &fs, std::string *message) { - const ProgramKey k(vs, fs); + const ProgramKey k(vs, fs, "", ""); auto i = m_sources_to_program.find(k); if (i != m_sources_to_program.end()) return i->second; diff --git a/retrace/daemon/glframe_state.hpp b/retrace/daemon/glframe_state.hpp index b653f842..b1ea098a 100644 --- a/retrace/daemon/glframe_state.hpp +++ b/retrace/daemon/glframe_state.hpp @@ -57,6 +57,8 @@ class StateTrack { int CurrentProgram() const { return current_program; } std::string currentVertexShader() const; std::string currentVertexIr() const; + std::string currentVertexNIR() const; + std::string currentVertexSSA() const; std::string currentVertexVec4() const; std::string currentFragmentShader() const; std::string currentFragmentIr() const; @@ -64,6 +66,8 @@ class StateTrack { std::string currentFragmentSimd16() const; std::string currentFragmentSSA() const; std::string currentFragmentNIR() const; + std::string currentTessControlShader() const; + std::string currentTessEvalShader() const; uint64_t currentContext() const { return current_context; } int useProgram(const std::string &vs, const std::string &fs, std::string *message = NULL); @@ -82,10 +86,11 @@ class StateTrack { static TrackMap lookup; class ProgramKey { public: - ProgramKey(const std::string &v, const std::string &f); + ProgramKey(const std::string &v, const std::string &f, + const std::string &t_c, const std::string &t_e); bool operator<(const ProgramKey &o) const; private: - std::string vs; std::string fs; + std::string vs, fs, tess_control, tess_eval; }; void parse(); @@ -106,6 +111,8 @@ class StateTrack { // for these maps, key is program std::map<int, std::string> program_to_vertex_shader_source; std::map<int, std::string> program_to_vertex_shader_ir; + std::map<int, std::string> program_to_vertex_shader_nir; + std::map<int, std::string> program_to_vertex_shader_ssa; std::map<int, std::string> program_to_vertex_shader_vec4; std::map<int, std::string> program_to_fragment_shader_source; std::map<int, std::string> program_to_fragment_shader_ir; @@ -113,6 +120,8 @@ class StateTrack { std::map<int, std::string> program_to_fragment_shader_simd16; std::map<int, std::string> program_to_fragment_shader_ssa; std::map<int, std::string> program_to_fragment_shader_nir; + std::map<int, std::string> program_to_tess_control_shader_source; + std::map<int, std::string> program_to_tess_eval_shader_source; std::vector<std::string> tracked_calls; }; diff --git a/retrace/daemon/glframe_stderr.cpp b/retrace/daemon/glframe_stderr.cpp index d396d168..2498e56b 100644 --- a/retrace/daemon/glframe_stderr.cpp +++ b/retrace/daemon/glframe_stderr.cpp @@ -30,6 +30,7 @@ #include <string> #include "glframe_stderr.hpp" +#include "glframe_logger.hpp" using glretrace::StdErrRedirect; diff --git a/retrace/daemon/playback.proto b/retrace/daemon/playback.proto index 41dc4db7..c0336f58 100644 --- a/retrace/daemon/playback.proto +++ b/retrace/daemon/playback.proto @@ -61,6 +61,10 @@ message ShaderAssemblyResponse { required string fragment_simd16 = 7; required string fragment_ssa = 8; required string fragment_nir = 9; + required string tess_control_shader = 10; + required string tess_eval_shader = 11; + required string vertex_nir = 12; + required string vertex_ssa = 13; } message MetricSeries { diff --git a/retrace/daemon/test/retrace_daemon_test.cpp b/retrace/daemon/test/retrace_daemon_test.cpp index ee70b076..5dce3425 100644 --- a/retrace/daemon/test/retrace_daemon_test.cpp +++ b/retrace/daemon/test/retrace_daemon_test.cpp @@ -57,13 +57,17 @@ class NullCallback : public OnFrameRetrace { void onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final) { + const std::string &fragment_nir_final, + const std::string &tess_control_shader, + const std::string &tess_eval_shader) { fs = fragment_shader; } void onRenderTarget(RenderId renderId, RenderTargetType type, diff --git a/retrace/daemon/test/retrace_metrics_test.cpp b/retrace/daemon/test/retrace_metrics_test.cpp index 4f923d8c..b1cfdc5e 100644 --- a/retrace/daemon/test/retrace_metrics_test.cpp +++ b/retrace/daemon/test/retrace_metrics_test.cpp @@ -43,13 +43,17 @@ class MetricsCallback : public OnFrameRetrace { void onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragemnt_shader, const std::string &fragemnt_ir, const std::string &fragemnt_simd8, const std::string &fragemnt_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final) {} + const std::string &fragment_nir_final, + const std::string &tess_control_shader, + const std::string &tess_eval_shader) {} void onRenderTarget(RenderId renderId, RenderTargetType type, const uvec & pngImageData) {} void onShaderCompile(RenderId renderId, ExperimentId experimentCount, diff --git a/retrace/daemon/ui/glframe_retrace_model.cpp b/retrace/daemon/ui/glframe_retrace_model.cpp index a504cd23..d0431f1b 100644 --- a/retrace/daemon/ui/glframe_retrace_model.cpp +++ b/retrace/daemon/ui/glframe_retrace_model.cpp @@ -101,13 +101,17 @@ void FrameRetraceModel::onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final) { + const std::string &fragment_nir_final, + const std::string &tess_control, + const std::string &tess_eval) { ScopedLock s(m_protect); m_vs_ir = vertex_ir.c_str(); m_fs_ir = fragment_ir.c_str(); @@ -116,8 +120,12 @@ FrameRetraceModel::onShaderAssembly(RenderId renderId, m_vs_vec4 = vertex_vec4.c_str(); m_fs_simd8 = fragment_simd8.c_str(); m_fs_simd16 = fragment_simd16.c_str(); + m_vs_ssa = vertex_ssa.c_str(); + m_vs_nir = vertex_nir.c_str(); m_fs_ssa = fragment_nir_ssa.c_str(); m_fs_nir = fragment_nir_final.c_str(); + m_tess_control_shader = tess_control.c_str(); + m_tess_eval_shader = tess_eval.c_str(); emit onShaders(); } @@ -375,3 +383,15 @@ FrameRetraceModel::onApi(RenderId renderId, } emit onApiCalls(); } + +QString +FrameRetraceModel::tessEvalSource() const { + ScopedLock s(m_protect); + return m_tess_eval_shader; +} + +QString +FrameRetraceModel::tessControlSource() const { + ScopedLock s(m_protect); + return m_tess_control_shader; +} diff --git a/retrace/daemon/ui/glframe_retrace_model.hpp b/retrace/daemon/ui/glframe_retrace_model.hpp index 4908a45a..48a9db91 100644 --- a/retrace/daemon/ui/glframe_retrace_model.hpp +++ b/retrace/daemon/ui/glframe_retrace_model.hpp @@ -100,8 +100,12 @@ class FrameRetraceModel : public QObject, Q_PROPERTY(QString vsVec4 READ vsVec4 NOTIFY onShaders) Q_PROPERTY(QString fsSimd8 READ fsSimd8 NOTIFY onShaders) Q_PROPERTY(QString fsSimd16 READ fsSimd16 NOTIFY onShaders) + Q_PROPERTY(QString vsNIR READ vsNIR NOTIFY onShaders) + Q_PROPERTY(QString vsSSA READ vsSSA NOTIFY onShaders) Q_PROPERTY(QString fsNIR READ fsNIR NOTIFY onShaders) Q_PROPERTY(QString fsSSA READ fsSSA NOTIFY onShaders) + Q_PROPERTY(QString tessControlSource READ tessControlSource NOTIFY onShaders) + Q_PROPERTY(QString tessEvalSource READ tessEvalSource NOTIFY onShaders) Q_PROPERTY(QString renderTargetImage READ renderTargetImage NOTIFY onRenderTarget) Q_PROPERTY(int openPercent READ openPercent NOTIFY onOpenPercent) @@ -133,13 +137,17 @@ class FrameRetraceModel : public QObject, void onShaderAssembly(RenderId renderId, const std::string &vertex_shader, const std::string &vertex_ir, + const std::string &vertex_nir, + const std::string &vertex_ssa, const std::string &vertex_vec4, const std::string &fragment_shader, const std::string &fragment_ir, const std::string &fragment_simd8, const std::string &fragment_simd16, const std::string &fragment_nir_ssa, - const std::string &fragment_nir_final); + const std::string &fragment_nir_final, + const std::string &tess_control, + const std::string &tess_eval); void onRenderTarget(RenderId renderId, RenderTargetType type, const std::vector<unsigned char> &data); void onShaderCompile(RenderId renderId, @@ -158,8 +166,12 @@ class FrameRetraceModel : public QObject, QString vsVec4() const { ScopedLock s(m_protect); return m_vs_vec4; } QString fsSimd8() const { ScopedLock s(m_protect); return m_fs_simd8; } QString fsSimd16() const { ScopedLock s(m_protect); return m_fs_simd16; } + QString vsSSA() const { ScopedLock s(m_protect); return m_vs_ssa; } + QString vsNIR() const { ScopedLock s(m_protect); return m_vs_nir; } QString fsSSA() const { ScopedLock s(m_protect); return m_fs_ssa; } QString fsNIR() const { ScopedLock s(m_protect); return m_fs_nir; } + QString tessControlSource() const; + QString tessEvalSource() const; QString renderTargetImage() const; int openPercent() const { ScopedLock s(m_protect); return m_open_percent; } float maxMetric() const { ScopedLock s(m_protect); return m_max_metric; } @@ -203,7 +215,8 @@ class FrameRetraceModel : public QObject, QList<BarMetrics> m_metrics; QString m_vs_ir, m_fs_ir, m_vs_shader, m_fs_shader, - m_vs_vec4, m_fs_simd8, m_fs_simd16, m_fs_ssa, m_fs_nir; + m_vs_vec4, m_fs_simd8, m_fs_simd16, m_fs_ssa, m_fs_nir, + m_vs_ssa, m_vs_nir, m_tess_control_shader, m_tess_eval_shader; QStringList m_api_calls; int m_open_percent; diff --git a/retrace/daemon/ui/qml/mainwin.qml b/retrace/daemon/ui/qml/mainwin.qml index c717047c..84317210 100644 --- a/retrace/daemon/ui/qml/mainwin.qml +++ b/retrace/daemon/ui/qml/mainwin.qml @@ -216,114 +216,197 @@ ApplicationWindow { Layout.fillWidth: true Layout.fillHeight: true Tab { - title: "Vertex Shader" + title: "Shaders" TabView { Tab { - title: "Source" - Flickable { - contentWidth: vsSource.width; contentHeight: vsSource.height - clip: true - TextEdit { - id: vsSource - text: frameRetrace.vsSource - onTextChanged: { vsCompileButton.vsText = text; vsCompileButton.visible=true; } + title: "Vertex" + TabView { + Tab { + title: "Source" + ScrollView { + Flickable { + contentWidth: vsSource.width; contentHeight: vsSource.height + clip: true + TextEdit { + id: vsSource + text: frameRetrace.vsSource + onTextChanged: { vsCompileButton.vsText = text; vsCompileButton.visible=true; } + } + } + } } - } - } - Tab { - title: "IR" - Flickable { - anchors.fill: parent - contentWidth: vsIR.width; contentHeight: vsIR.height - clip: true - Text { - id: vsIR - text: frameRetrace.vsIR + Tab { + title: "IR" + ScrollView { + Flickable { + anchors.fill: parent + contentWidth: vsIR.width; contentHeight: vsIR.height + clip: true + Text { + id: vsIR + text: frameRetrace.vsIR + } + } + } + } + Tab { + title: "NIR" + ScrollView { + Flickable { + anchors.fill: parent + contentWidth: vsNIR.width; contentHeight: vsNIR.height + clip: true + Text { + id: vsNIR + text: frameRetrace.vsNIR + } + } + } + } + Tab { + title: "SSA" + ScrollView { + Flickable { + anchors.fill: parent + contentWidth: vsSSA.width; contentHeight: vsSSA.height + clip: true + Text { + id: vsSSA + text: frameRetrace.vsSSA + } + } + } + } + Tab { + title: "Vec4" + ScrollView { + Flickable { + anchors.fill: parent + contentWidth: vsVec4.width; contentHeight: vsVec4.height + clip: true + Text { + id: vsVec4 + text: frameRetrace.vsVec4 + } + } + } } } } Tab { - title: "Vec4" - Flickable { + title: "Fragment" + TabView { anchors.fill: parent - contentWidth: vsVec4.width; contentHeight: vsVec4.height - clip: true - Text { - id: vsVec4 - text: frameRetrace.vsVec4 + Tab { + title: "Source" + ScrollView { + Flickable { + contentWidth: fsSource.width; contentHeight: fsSource.height + clip: true + TextEdit { + id: fsSource + text: frameRetrace.fsSource + onTextChanged: { vsCompileButton.fsText = text; vsCompileButton.visible=true; } + } + } + } } - } - } - } - } - Tab { - title: "Fragment Shader" - TabView { - anchors.fill: parent - Tab { - title: "Source" - Flickable { - contentWidth: fsSource.width; contentHeight: fsSource.height - clip: true - TextEdit { - id: fsSource - text: frameRetrace.fsSource - onTextChanged: { vsCompileButton.fsText = text; vsCompileButton.visible=true; } + Tab { + title: "IR" + ScrollView { + Flickable { + contentWidth: fsIR.width; contentHeight: fsIR.height + clip: true + Text { + id: fsIR + text: frameRetrace.fsIR + } + } + } } - } - } - Tab { - title: "IR" - Flickable { - contentWidth: fsIR.width; contentHeight: fsIR.height - clip: true - Text { - id: fsIR - text: frameRetrace.fsIR + Tab { + title: "Simd8" + ScrollView { + Flickable { + contentWidth: fsSimd8.width; contentHeight: fsSimd8.height + clip: true + Text { + id: fsSimd8 + text: frameRetrace.fsSimd8 + } + } + } } - } - } - Tab { - title: "Simd8" - Flickable { - contentWidth: fsSimd8.width; contentHeight: fsSimd8.height - clip: true - Text { - id: fsSimd8 - text: frameRetrace.fsSimd8 + Tab { + title: "Simd16" + ScrollView { + Flickable { + contentWidth: fsSimd16.width; contentHeight: fsSimd16.height + clip: true + Text { + id: fsSimd16 + text: frameRetrace.fsSimd16 + } + } + } } - } - } - Tab { - title: "Simd16" - Flickable { - contentWidth: fsSimd16.width; contentHeight: fsSimd16.height - clip: true - Text { - id: fsSimd16 - text: frameRetrace.fsSimd16 + Tab { + title: "SSA" + ScrollView { + Flickable { + contentWidth: fsSSA.width; contentHeight: fsSSA.height + clip: true + Text { + id: fsSSA + text: frameRetrace.fsSSA + } + } + } } - } - } - Tab { - title: "SSA" - Flickable { - contentWidth: fsSSA.width; contentHeight: fsSSA.height - clip: true - Text { - id: fsSSA - text: frameRetrace.fsSSA + Tab { + title: "NIR" + ScrollView { + Flickable { + contentWidth: fsNIR.width; contentHeight: fsNIR.height + clip: true + Text { + id: fsNIR + text: frameRetrace.fsNIR + } + } + } } } } Tab { - title: "NIR" - Flickable { - contentWidth: fsNIR.width; contentHeight: fsNIR.height - clip: true - Text { - id: fsNIR - text: frameRetrace.fsNIR + title: "Tesselation" + TabView { + anchors.fill: parent + Tab { + title: "Control" + ScrollView { + Flickable { + contentWidth: tessControlSource.width; contentHeight: tessControlSource.height + clip: true + Text { + id: tessControlSource + text: frameRetrace.tessControlSource + } + } + } + } + Tab { + title: "Eval" + ScrollView { + Flickable { + contentWidth: tessEvalSource.width; contentHeight: tessEvalSource.height + clip: true + Text { + id: tessEvalSource + text: frameRetrace.tessEvalSource + } + } + } } } } @@ -371,11 +454,13 @@ ApplicationWindow { title: "Api Calls" id: apiTab clip: true - ListView { - model: frameRetrace.apiCalls - anchors.fill: apiTab - delegate: Text { - text: modelData + ScrollView { + ListView { + model: frameRetrace.apiCalls + anchors.fill: apiTab + delegate: Text { + text: modelData + } } } } |