mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-30 11:21:01 +00:00
Linux compile fixes
This commit is contained in:
@@ -160,7 +160,7 @@ void TextureViewer::OnLogfileLoaded()
|
||||
#endif
|
||||
|
||||
m_Core->Renderer()->BlockInvoke([wnd, this](IReplayRenderer *r) {
|
||||
m_Output = r->CreateOutput(wnd);
|
||||
m_Output = r->CreateOutput(wnd, eOutputType_TexDisplay);
|
||||
ui->render->SetOutput(m_Output);
|
||||
|
||||
OutputConfig c = { eOutputType_TexDisplay };
|
||||
|
||||
+17
-16
@@ -63,20 +63,21 @@ data/glsl/quadoverdraw.frago \
|
||||
data/glsl/histogram.compo \
|
||||
data/glsl/arraymscopy.compo \
|
||||
data/glsl/outline.frago \
|
||||
data/spv/blitvs.spvo \
|
||||
data/spv/checkerboardfs.spvo \
|
||||
data/spv/texdisplayfs.spvo \
|
||||
data/spv/textvs.spvo \
|
||||
data/spv/textfs.spvo \
|
||||
data/spv/fixedcolfs.spvo \
|
||||
data/spv/meshvs.spvo \
|
||||
data/spv/meshgs.spvo \
|
||||
data/spv/meshfs.spvo \
|
||||
data/spv/histogramcs.spvo \
|
||||
data/spv/minmaxtilecs.spvo \
|
||||
data/spv/minmaxresultcs.spvo \
|
||||
data/spv/outline.spvo \
|
||||
data/spv/blit.verto \
|
||||
data/spv/checkerboard.frago \
|
||||
data/spv/texdisplay.frago \
|
||||
data/spv/text.verto \
|
||||
data/spv/text.frago \
|
||||
data/spv/fixedcol.frago \
|
||||
data/spv/mesh.verto \
|
||||
data/spv/mesh.geomo \
|
||||
data/spv/mesh.frago \
|
||||
data/spv/histogram.compo \
|
||||
data/spv/minmaxtile.compo \
|
||||
data/spv/minmaxresult.compo \
|
||||
data/spv/outline.frago \
|
||||
data/spv/debuguniforms.ho \
|
||||
data/spv/texsample.ho \
|
||||
data/sourcecodepro.ttfo
|
||||
|
||||
.PHONY: all
|
||||
@@ -96,10 +97,10 @@ $(OBJDIR)/%.o: %.c
|
||||
# to produce the right symbol names
|
||||
OBJGEN = \
|
||||
mkdir -p $$(dirname $@); \
|
||||
cd $$(dirname $<); \
|
||||
objcopy --input binary --output elf64-x86-64 --binary-architecture i386 $$(basename $<) $$(basename $@); \
|
||||
cd data/; \
|
||||
objcopy --input binary --output elf64-x86-64 --binary-architecture i386 $$(echo $< | sed -e '{s/data\///g}') $$(basename $@); \
|
||||
cd - > /dev/null 2>&1; \
|
||||
mv $$(dirname $<)/$$(basename $@) $@;
|
||||
mv data/$$(basename $@) $@;
|
||||
|
||||
$(OBJDIR)/%.verto: %.vert
|
||||
@echo Object building $@
|
||||
|
||||
@@ -77,7 +77,7 @@ bool LoadShaderCache(const char *filename,
|
||||
|
||||
for(uint32_t i=0; i < numentries; i++)
|
||||
{
|
||||
if(bufsize < sizeof(uint32_t))
|
||||
if((size_t)bufsize < sizeof(uint32_t))
|
||||
{
|
||||
RDCERR("Invalid shader cache - truncated, not enough data for shader hash");
|
||||
ret = false;
|
||||
@@ -86,7 +86,7 @@ bool LoadShaderCache(const char *filename,
|
||||
|
||||
uint32_t hash = *(uint32_t *)ptr; ptr += sizeof(uint32_t); bufsize -= sizeof(uint32_t);
|
||||
|
||||
if(bufsize < sizeof(uint32_t))
|
||||
if((size_t)bufsize < sizeof(uint32_t))
|
||||
{
|
||||
RDCERR("Invalid shader cache - truncated, not enough data for shader length");
|
||||
ret = false;
|
||||
|
||||
@@ -41,8 +41,8 @@ namespace ResourceIDGen
|
||||
// almost 32 years generating 100000 IDs per frame at 10000 FPS.
|
||||
|
||||
// only add this value once (since we're not |'ing on a bit)
|
||||
if(globalIDCounter < 1000000000000000000ULL)
|
||||
globalIDCounter = RDCMAX(uint64_t(globalIDCounter), uint64_t(globalIDCounter+1000000000000000000ULL));
|
||||
if(globalIDCounter < 1000000000000000000LL)
|
||||
globalIDCounter = RDCMAX(int64_t(globalIDCounter), int64_t(globalIDCounter+1000000000000000000LL));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -28,39 +28,39 @@
|
||||
extern char CONCAT( CONCAT(_binary_, filename) , _start) ; \
|
||||
extern char CONCAT( CONCAT(_binary_, filename) , _end) ;
|
||||
|
||||
DECLARE_EMBED(debuguniforms_h);
|
||||
DECLARE_EMBED(texsample_h);
|
||||
DECLARE_EMBED(blit_vert);
|
||||
DECLARE_EMBED(blit_frag);
|
||||
DECLARE_EMBED(texdisplay_frag);
|
||||
DECLARE_EMBED(checkerboard_frag);
|
||||
DECLARE_EMBED(histogram_comp);
|
||||
DECLARE_EMBED(quadoverdraw_frag);
|
||||
DECLARE_EMBED(arraymscopy_comp);
|
||||
DECLARE_EMBED(mesh_vert);
|
||||
DECLARE_EMBED(mesh_frag);
|
||||
DECLARE_EMBED(mesh_geom);
|
||||
DECLARE_EMBED(mesh_comp);
|
||||
DECLARE_EMBED(generic_vert);
|
||||
DECLARE_EMBED(generic_frag);
|
||||
DECLARE_EMBED(text_frag);
|
||||
DECLARE_EMBED(text_vert);
|
||||
DECLARE_EMBED(glsl_debuguniforms_h);
|
||||
DECLARE_EMBED(glsl_texsample_h);
|
||||
DECLARE_EMBED(glsl_blit_vert);
|
||||
DECLARE_EMBED(glsl_blit_frag);
|
||||
DECLARE_EMBED(glsl_texdisplay_frag);
|
||||
DECLARE_EMBED(glsl_checkerboard_frag);
|
||||
DECLARE_EMBED(glsl_histogram_comp);
|
||||
DECLARE_EMBED(glsl_quadoverdraw_frag);
|
||||
DECLARE_EMBED(glsl_arraymscopy_comp);
|
||||
DECLARE_EMBED(glsl_mesh_vert);
|
||||
DECLARE_EMBED(glsl_mesh_frag);
|
||||
DECLARE_EMBED(glsl_mesh_geom);
|
||||
DECLARE_EMBED(glsl_mesh_comp);
|
||||
DECLARE_EMBED(glsl_generic_vert);
|
||||
DECLARE_EMBED(glsl_generic_frag);
|
||||
DECLARE_EMBED(glsl_text_frag);
|
||||
DECLARE_EMBED(glsl_text_vert);
|
||||
DECLARE_EMBED(glsl_outline_frag);
|
||||
DECLARE_EMBED(sourcecodepro_ttf);
|
||||
DECLARE_EMBED(outline_frag);
|
||||
DECLARE_EMBED(spirv_blit_vert);
|
||||
DECLARE_EMBED(spirv_checkerboard_frag);
|
||||
DECLARE_EMBED(spirv_texdisplay_frag);
|
||||
DECLARE_EMBED(spirv_text_vert);
|
||||
DECLARE_EMBED(spirv_text_frag);
|
||||
DECLARE_EMBED(spirv_fixedcol_frag);
|
||||
DECLARE_EMBED(spirv_mesh_vert);
|
||||
DECLARE_EMBED(spirv_mesh_geom);
|
||||
DECLARE_EMBED(spirv_mesh_frag);
|
||||
DECLARE_EMBED(spirv_minmaxtile_comp);
|
||||
DECLARE_EMBED(spirv_minmaxresult_comp);
|
||||
DECLARE_EMBED(spirv_histogram_comp);
|
||||
DECLARE_EMBED(spirv_outline_frag);
|
||||
DECLARE_EMBED(spirv_debuguniforms_h);
|
||||
DECLARE_EMBED(spirv_texsample_h);
|
||||
DECLARE_EMBED(spv_blit_vert);
|
||||
DECLARE_EMBED(spv_checkerboard_frag);
|
||||
DECLARE_EMBED(spv_texdisplay_frag);
|
||||
DECLARE_EMBED(spv_text_vert);
|
||||
DECLARE_EMBED(spv_text_frag);
|
||||
DECLARE_EMBED(spv_fixedcol_frag);
|
||||
DECLARE_EMBED(spv_mesh_vert);
|
||||
DECLARE_EMBED(spv_mesh_geom);
|
||||
DECLARE_EMBED(spv_mesh_frag);
|
||||
DECLARE_EMBED(spv_minmaxtile_comp);
|
||||
DECLARE_EMBED(spv_minmaxresult_comp);
|
||||
DECLARE_EMBED(spv_histogram_comp);
|
||||
DECLARE_EMBED(spv_outline_frag);
|
||||
DECLARE_EMBED(spv_debuguniforms_h);
|
||||
DECLARE_EMBED(spv_texsample_h);
|
||||
|
||||
#undef DECLARE_EMBED
|
||||
|
||||
+33
-33
@@ -110,42 +110,42 @@ RESOURCE_debugcbuffers_h TYPE_EMBED "hlsl/debugcbuffers.h"
|
||||
RESOURCE_multisample_hlsl TYPE_EMBED "hlsl/multisample.hlsl"
|
||||
RESOURCE_mesh_hlsl TYPE_EMBED "hlsl/mesh.hlsl"
|
||||
|
||||
RESOURCE_blit_vert TYPE_EMBED "glsl/blit.vert"
|
||||
RESOURCE_blit_frag TYPE_EMBED "glsl/blit.frag"
|
||||
RESOURCE_texdisplay_frag TYPE_EMBED "glsl/texdisplay.frag"
|
||||
RESOURCE_checkerboard_frag TYPE_EMBED "glsl/checkerboard.frag"
|
||||
RESOURCE_generic_vert TYPE_EMBED "glsl/generic.vert"
|
||||
RESOURCE_generic_frag TYPE_EMBED "glsl/generic.frag"
|
||||
RESOURCE_mesh_vert TYPE_EMBED "glsl/mesh.vert"
|
||||
RESOURCE_debuguniforms_h TYPE_EMBED "glsl/debuguniforms.h"
|
||||
RESOURCE_text_vert TYPE_EMBED "glsl/text.vert"
|
||||
RESOURCE_text_frag TYPE_EMBED "glsl/text.frag"
|
||||
RESOURCE_texsample_h TYPE_EMBED "glsl/texsample.h"
|
||||
RESOURCE_histogram_comp TYPE_EMBED "glsl/histogram.comp"
|
||||
RESOURCE_mesh_frag TYPE_EMBED "glsl/mesh.frag"
|
||||
RESOURCE_mesh_geom TYPE_EMBED "glsl/mesh.geom"
|
||||
RESOURCE_mesh_comp TYPE_EMBED "glsl/mesh.comp"
|
||||
RESOURCE_arraymscopy_comp TYPE_EMBED "glsl/arraymscopy.comp"
|
||||
RESOURCE_quadoverdraw_frag TYPE_EMBED "glsl/quadoverdraw.frag"
|
||||
RESOURCE_outline_frag TYPE_EMBED "glsl/outline.frag"
|
||||
RESOURCE_glsl_blit_vert TYPE_EMBED "glsl/blit.vert"
|
||||
RESOURCE_glsl_blit_frag TYPE_EMBED "glsl/blit.frag"
|
||||
RESOURCE_glsl_texdisplay_frag TYPE_EMBED "glsl/texdisplay.frag"
|
||||
RESOURCE_glsl_checkerboard_frag TYPE_EMBED "glsl/checkerboard.frag"
|
||||
RESOURCE_glsl_generic_vert TYPE_EMBED "glsl/generic.vert"
|
||||
RESOURCE_glsl_generic_frag TYPE_EMBED "glsl/generic.frag"
|
||||
RESOURCE_glsl_mesh_vert TYPE_EMBED "glsl/mesh.vert"
|
||||
RESOURCE_glsl_debuguniforms_h TYPE_EMBED "glsl/debuguniforms.h"
|
||||
RESOURCE_glsl_text_vert TYPE_EMBED "glsl/text.vert"
|
||||
RESOURCE_glsl_text_frag TYPE_EMBED "glsl/text.frag"
|
||||
RESOURCE_glsl_texsample_h TYPE_EMBED "glsl/texsample.h"
|
||||
RESOURCE_glsl_histogram_comp TYPE_EMBED "glsl/histogram.comp"
|
||||
RESOURCE_glsl_mesh_frag TYPE_EMBED "glsl/mesh.frag"
|
||||
RESOURCE_glsl_mesh_geom TYPE_EMBED "glsl/mesh.geom"
|
||||
RESOURCE_glsl_mesh_comp TYPE_EMBED "glsl/mesh.comp"
|
||||
RESOURCE_glsl_arraymscopy_comp TYPE_EMBED "glsl/arraymscopy.comp"
|
||||
RESOURCE_glsl_quadoverdraw_frag TYPE_EMBED "glsl/quadoverdraw.frag"
|
||||
RESOURCE_glsl_outline_frag TYPE_EMBED "glsl/outline.frag"
|
||||
|
||||
RESOURCE_sourcecodepro_ttf TYPE_EMBED "sourcecodepro.ttf"
|
||||
|
||||
RESOURCE_spirv_blit_vert TYPE_EMBED "spv/blit.vert"
|
||||
RESOURCE_spirv_checkerboard_frag TYPE_EMBED "spv/checkerboard.frag"
|
||||
RESOURCE_spirv_texdisplay_frag TYPE_EMBED "spv/texdisplay.frag"
|
||||
RESOURCE_spirv_text_vert TYPE_EMBED "spv/text.vert"
|
||||
RESOURCE_spirv_text_frag TYPE_EMBED "spv/text.frag"
|
||||
RESOURCE_spirv_fixedcol_frag TYPE_EMBED "spv/fixedcol.frag"
|
||||
RESOURCE_spirv_mesh_vert TYPE_EMBED "spv/mesh.vert"
|
||||
RESOURCE_spirv_mesh_geom TYPE_EMBED "spv/mesh.geom"
|
||||
RESOURCE_spirv_mesh_frag TYPE_EMBED "spv/mesh.frag"
|
||||
RESOURCE_spirv_minmaxtile_comp TYPE_EMBED "spv/minmaxtile.comp"
|
||||
RESOURCE_spirv_minmaxresult_comp TYPE_EMBED "spv/minmaxresult.comp"
|
||||
RESOURCE_spirv_histogram_comp TYPE_EMBED "spv/histogram.comp"
|
||||
RESOURCE_spirv_outline_frag TYPE_EMBED "spv/outline.frag"
|
||||
RESOURCE_spirv_debuguniforms_h TYPE_EMBED "spv/debuguniforms.h"
|
||||
RESOURCE_spirv_texsample_h TYPE_EMBED "spv/texsample.h"
|
||||
RESOURCE_spv_blit_vert TYPE_EMBED "spv/blit.vert"
|
||||
RESOURCE_spv_checkerboard_frag TYPE_EMBED "spv/checkerboard.frag"
|
||||
RESOURCE_spv_texdisplay_frag TYPE_EMBED "spv/texdisplay.frag"
|
||||
RESOURCE_spv_text_vert TYPE_EMBED "spv/text.vert"
|
||||
RESOURCE_spv_text_frag TYPE_EMBED "spv/text.frag"
|
||||
RESOURCE_spv_fixedcol_frag TYPE_EMBED "spv/fixedcol.frag"
|
||||
RESOURCE_spv_mesh_vert TYPE_EMBED "spv/mesh.vert"
|
||||
RESOURCE_spv_mesh_geom TYPE_EMBED "spv/mesh.geom"
|
||||
RESOURCE_spv_mesh_frag TYPE_EMBED "spv/mesh.frag"
|
||||
RESOURCE_spv_minmaxtile_comp TYPE_EMBED "spv/minmaxtile.comp"
|
||||
RESOURCE_spv_minmaxresult_comp TYPE_EMBED "spv/minmaxresult.comp"
|
||||
RESOURCE_spv_histogram_comp TYPE_EMBED "spv/histogram.comp"
|
||||
RESOURCE_spv_outline_frag TYPE_EMBED "spv/outline.frag"
|
||||
RESOURCE_spv_debuguniforms_h TYPE_EMBED "spv/debuguniforms.h"
|
||||
RESOURCE_spv_texsample_h TYPE_EMBED "spv/texsample.h"
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
+33
-33
@@ -12,42 +12,42 @@
|
||||
#define RESOURCE_multisample_hlsl 106
|
||||
#define RESOURCE_mesh_hlsl 107
|
||||
|
||||
#define RESOURCE_blit_vert 201
|
||||
#define RESOURCE_blit_frag 202
|
||||
#define RESOURCE_texdisplay_frag 203
|
||||
#define RESOURCE_checkerboard_frag 204
|
||||
#define RESOURCE_generic_vert 205
|
||||
#define RESOURCE_generic_frag 206
|
||||
#define RESOURCE_mesh_vert 207
|
||||
#define RESOURCE_debuguniforms_h 208
|
||||
#define RESOURCE_text_vert 209
|
||||
#define RESOURCE_text_frag 210
|
||||
#define RESOURCE_texsample_h 211
|
||||
#define RESOURCE_histogram_comp 212
|
||||
#define RESOURCE_mesh_frag 213
|
||||
#define RESOURCE_mesh_geom 214
|
||||
#define RESOURCE_mesh_comp 215
|
||||
#define RESOURCE_arraymscopy_comp 216
|
||||
#define RESOURCE_quadoverdraw_frag 217
|
||||
#define RESOURCE_outline_frag 218
|
||||
#define RESOURCE_glsl_blit_vert 201
|
||||
#define RESOURCE_glsl_blit_frag 202
|
||||
#define RESOURCE_glsl_texdisplay_frag 203
|
||||
#define RESOURCE_glsl_checkerboard_frag 204
|
||||
#define RESOURCE_glsl_generic_vert 205
|
||||
#define RESOURCE_glsl_generic_frag 206
|
||||
#define RESOURCE_glsl_mesh_vert 207
|
||||
#define RESOURCE_glsl_debuguniforms_h 208
|
||||
#define RESOURCE_glsl_text_vert 209
|
||||
#define RESOURCE_glsl_text_frag 210
|
||||
#define RESOURCE_glsl_texsample_h 211
|
||||
#define RESOURCE_glsl_histogram_comp 212
|
||||
#define RESOURCE_glsl_mesh_frag 213
|
||||
#define RESOURCE_glsl_mesh_geom 214
|
||||
#define RESOURCE_glsl_mesh_comp 215
|
||||
#define RESOURCE_glsl_arraymscopy_comp 216
|
||||
#define RESOURCE_glsl_quadoverdraw_frag 217
|
||||
#define RESOURCE_glsl_outline_frag 218
|
||||
|
||||
#define RESOURCE_sourcecodepro_ttf 301
|
||||
|
||||
#define RESOURCE_spirv_blit_vert 401
|
||||
#define RESOURCE_spirv_checkerboard_frag 402
|
||||
#define RESOURCE_spirv_texdisplay_frag 403
|
||||
#define RESOURCE_spirv_text_vert 404
|
||||
#define RESOURCE_spirv_text_frag 405
|
||||
#define RESOURCE_spirv_fixedcol_frag 408
|
||||
#define RESOURCE_spirv_mesh_vert 409
|
||||
#define RESOURCE_spirv_mesh_geom 410
|
||||
#define RESOURCE_spirv_mesh_frag 411
|
||||
#define RESOURCE_spirv_minmaxtile_comp 412
|
||||
#define RESOURCE_spirv_minmaxresult_comp 413
|
||||
#define RESOURCE_spirv_histogram_comp 414
|
||||
#define RESOURCE_spirv_outline_frag 415
|
||||
#define RESOURCE_spirv_debuguniforms_h 416
|
||||
#define RESOURCE_spirv_texsample_h 417
|
||||
#define RESOURCE_spv_blit_vert 401
|
||||
#define RESOURCE_spv_checkerboard_frag 402
|
||||
#define RESOURCE_spv_texdisplay_frag 403
|
||||
#define RESOURCE_spv_text_vert 404
|
||||
#define RESOURCE_spv_text_frag 405
|
||||
#define RESOURCE_spv_fixedcol_frag 408
|
||||
#define RESOURCE_spv_mesh_vert 409
|
||||
#define RESOURCE_spv_mesh_geom 410
|
||||
#define RESOURCE_spv_mesh_frag 411
|
||||
#define RESOURCE_spv_minmaxtile_comp 412
|
||||
#define RESOURCE_spv_minmaxresult_comp 413
|
||||
#define RESOURCE_spv_histogram_comp 414
|
||||
#define RESOURCE_spv_outline_frag 415
|
||||
#define RESOURCE_spv_debuguniforms_h 416
|
||||
#define RESOURCE_spv_texsample_h 417
|
||||
|
||||
#if !defined(STRINGIZE)
|
||||
#define STRINGIZE2(a) #a
|
||||
|
||||
@@ -185,16 +185,16 @@ void GLReplay::InitDebugData()
|
||||
|
||||
DebugData.outWidth = 0.0f; DebugData.outHeight = 0.0f;
|
||||
|
||||
string blitvsSource = GetEmbeddedResource(blit_vert);
|
||||
string blitfsSource = GetEmbeddedResource(blit_frag);
|
||||
string blitvsSource = GetEmbeddedResource(glsl_blit_vert);
|
||||
string blitfsSource = GetEmbeddedResource(glsl_blit_frag);
|
||||
|
||||
DebugData.blitProg = CreateShaderProgram(blitvsSource.c_str(), blitfsSource.c_str());
|
||||
|
||||
string glslheader = "#version 420 core\n\n";
|
||||
glslheader += GetEmbeddedResource(debuguniforms_h);
|
||||
glslheader += GetEmbeddedResource(glsl_debuguniforms_h);
|
||||
|
||||
string texfs = GetEmbeddedResource(texsample_h);
|
||||
texfs += GetEmbeddedResource(texdisplay_frag);
|
||||
string texfs = GetEmbeddedResource(glsl_texsample_h);
|
||||
texfs += GetEmbeddedResource(glsl_texdisplay_frag);
|
||||
|
||||
DebugData.texDisplayVSProg = CreateShaderProgram(blitvsSource.c_str(), NULL);
|
||||
|
||||
@@ -231,12 +231,12 @@ void GLReplay::InitDebugData()
|
||||
|
||||
string glsl = "#version 450 core\n\n";
|
||||
glsl += "#define RENDERDOC_QuadOverdrawPS\n\n";
|
||||
glsl += GetEmbeddedResource(quadoverdraw_frag);
|
||||
glsl += GetEmbeddedResource(glsl_quadoverdraw_frag);
|
||||
DebugData.quadoverdrawFSProg = CreateShaderProgram(NULL, glsl.c_str());
|
||||
|
||||
glsl = "#version 420 core\n\n";
|
||||
glsl += "#define RENDERDOC_QOResolvePS\n\n";
|
||||
glsl += GetEmbeddedResource(quadoverdraw_frag);
|
||||
glsl += GetEmbeddedResource(glsl_quadoverdraw_frag);
|
||||
DebugData.quadoverdrawResolveProg = CreateShaderProgram(blitvsSource.c_str(), glsl.c_str());
|
||||
}
|
||||
else
|
||||
@@ -247,28 +247,28 @@ void GLReplay::InitDebugData()
|
||||
glsl += "#define RENDERDOC_QuadOverdrawPS\n\n";
|
||||
glsl += "#define dFdxFine dFdx\n\n"; // dFdx fine functions not available before GLSL 450
|
||||
glsl += "#define dFdyFine dFdy\n\n"; // use normal dFdx, which might be coarse, so won't show quad overdraw properly
|
||||
glsl += GetEmbeddedResource(quadoverdraw_frag);
|
||||
glsl += GetEmbeddedResource(glsl_quadoverdraw_frag);
|
||||
DebugData.quadoverdrawFSProg = CreateShaderProgram(NULL, glsl.c_str());
|
||||
|
||||
glsl = "#version 420 core\n\n";
|
||||
glsl += "#define RENDERDOC_QOResolvePS\n\n";
|
||||
glsl += GetEmbeddedResource(quadoverdraw_frag);
|
||||
glsl += GetEmbeddedResource(glsl_quadoverdraw_frag);
|
||||
DebugData.quadoverdrawResolveProg = CreateShaderProgram(blitvsSource.c_str(), glsl.c_str());
|
||||
}
|
||||
|
||||
string checkerfs = GetEmbeddedResource(checkerboard_frag);
|
||||
string checkerfs = GetEmbeddedResource(glsl_checkerboard_frag);
|
||||
|
||||
DebugData.checkerProg = CreateShaderProgram(blitvsSource.c_str(), checkerfs.c_str());
|
||||
|
||||
string genericvsSource = GetEmbeddedResource(generic_vert);
|
||||
string genericfsSource = GetEmbeddedResource(generic_frag);
|
||||
string genericvsSource = GetEmbeddedResource(glsl_generic_vert);
|
||||
string genericfsSource = GetEmbeddedResource(glsl_generic_frag);
|
||||
|
||||
DebugData.genericProg = CreateShaderProgram(genericvsSource.c_str(), genericfsSource.c_str());
|
||||
DebugData.genericFSProg = CreateShaderProgram(NULL, genericfsSource.c_str());
|
||||
|
||||
string meshvs = GetEmbeddedResource(mesh_vert);
|
||||
string meshgs = GetEmbeddedResource(mesh_geom);
|
||||
string meshfs = GetEmbeddedResource(mesh_frag);
|
||||
string meshvs = GetEmbeddedResource(glsl_mesh_vert);
|
||||
string meshgs = GetEmbeddedResource(glsl_mesh_geom);
|
||||
string meshfs = GetEmbeddedResource(glsl_mesh_frag);
|
||||
meshfs = glslheader + meshfs;
|
||||
|
||||
DebugData.meshProg = CreateShaderProgram(meshvs.c_str(), meshfs.c_str());
|
||||
@@ -350,8 +350,8 @@ void GLReplay::InitDebugData()
|
||||
|
||||
// histogram/minmax data
|
||||
{
|
||||
string histogramglsl = GetEmbeddedResource(texsample_h);
|
||||
histogramglsl += GetEmbeddedResource(histogram_comp);
|
||||
string histogramglsl = GetEmbeddedResource(glsl_texsample_h);
|
||||
histogramglsl += GetEmbeddedResource(glsl_histogram_comp);
|
||||
|
||||
RDCEraseEl(DebugData.minmaxTileProgram);
|
||||
RDCEraseEl(DebugData.histogramProgram);
|
||||
@@ -421,18 +421,18 @@ void GLReplay::InitDebugData()
|
||||
|
||||
{
|
||||
string glsl = "#version 420 core\n\n#define MS2Array main\n\n";
|
||||
glsl += GetEmbeddedResource(arraymscopy_comp);
|
||||
glsl += GetEmbeddedResource(glsl_arraymscopy_comp);
|
||||
|
||||
DebugData.MS2Array = CreateCShaderProgram(glsl.c_str());
|
||||
|
||||
glsl = "#version 420 core\n\n#define Array2MS main\n\n";
|
||||
glsl += GetEmbeddedResource(arraymscopy_comp);
|
||||
glsl += GetEmbeddedResource(glsl_arraymscopy_comp);
|
||||
|
||||
DebugData.Array2MS = CreateCShaderProgram(glsl.c_str());
|
||||
}
|
||||
|
||||
{
|
||||
string glsl = GetEmbeddedResource(mesh_comp);
|
||||
string glsl = GetEmbeddedResource(glsl_mesh_comp);
|
||||
|
||||
DebugData.meshPickProgram = CreateCShaderProgram(glsl.c_str());
|
||||
}
|
||||
@@ -518,7 +518,7 @@ void GLReplay::InitDebugData()
|
||||
|
||||
DebugData.replayQuadProg = CreateShaderProgram(blitvsSource.c_str(), genericfsSource.c_str());
|
||||
|
||||
string outlinefsSource = GetEmbeddedResource(outline_frag);
|
||||
string outlinefsSource = GetEmbeddedResource(glsl_outline_frag);
|
||||
|
||||
DebugData.outlineQuadProg = CreateShaderProgram(blitvsSource.c_str(), outlinefsSource.c_str());
|
||||
|
||||
|
||||
@@ -1107,9 +1107,9 @@ void WrappedOpenGL::ContextData::CreateDebugData(const GLHookSet &gl)
|
||||
gl.glCreateProgram && gl.glAttachShader && gl.glLinkProgram && gl.glGetProgramiv && gl.glGetProgramInfoLog)
|
||||
{
|
||||
string textvs = "#version 420 core\n\n";
|
||||
textvs += GetEmbeddedResource(debuguniforms_h);
|
||||
textvs += GetEmbeddedResource(text_vert);
|
||||
string textfs = GetEmbeddedResource(text_frag);
|
||||
textvs += GetEmbeddedResource(glsl_debuguniforms_h);
|
||||
textvs += GetEmbeddedResource(glsl_text_vert);
|
||||
string textfs = GetEmbeddedResource(glsl_text_frag);
|
||||
|
||||
GLuint vs = gl.glCreateShader(eGL_VERTEX_SHADER);
|
||||
GLuint fs = gl.glCreateShader(eGL_FRAGMENT_SHADER);
|
||||
|
||||
@@ -7,7 +7,7 @@ MACROS=-DLINUX \
|
||||
-DVK_USE_PLATFORM_XCB_KHR \
|
||||
-DVK_USE_PLATFORM_XLIB_KHR \
|
||||
-DGIT_COMMIT_HASH="\"$(COMMIT)\""
|
||||
CFLAGS=-c -Wall -Werror -Wno-unused -Wno-unknown-pragmas -fPIC $(MACROS) -I../../ -I../../3rdparty/ -I$(VK_SDK_PATH)/include/vulkan
|
||||
CFLAGS=-c -Wall -Werror -Wno-unused -Wno-unknown-pragmas -fPIC $(MACROS) -I../../ -I../../3rdparty/ -I$(VK_SDK_PATH)/include
|
||||
CPPFLAGS=-std=c++11 -g -Wno-reorder -fvisibility=hidden -fvisibility-inlines-hidden
|
||||
OBJDIR=.obj
|
||||
OBJECTS=vk_dispatchtables.o \
|
||||
|
||||
@@ -44,6 +44,8 @@ VkAccessFlags MakeAccessMask(VkImageLayout layout)
|
||||
return VkAccessFlags(VK_ACCESS_INPUT_ATTACHMENT_READ_BIT | VK_ACCESS_SHADER_READ_BIT);
|
||||
case VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL:
|
||||
return VkAccessFlags(VK_ACCESS_TRANSFER_READ_BIT);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return VkAccessFlags(0);
|
||||
|
||||
@@ -468,7 +468,7 @@ private:
|
||||
|
||||
public:
|
||||
WrappedVulkan(const char *logFilename);
|
||||
~WrappedVulkan();
|
||||
virtual ~WrappedVulkan();
|
||||
|
||||
ResourceId GetContextResourceID() { return m_FrameCaptureRecord->GetResourceID(); }
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
|
||||
#include "data/spv/debuguniforms.h"
|
||||
|
||||
const VkDeviceSize STAGE_BUFFER_BYTE_SIZE = 16*1024*1024ULL;
|
||||
|
||||
void VulkanDebugManager::GPUBuffer::Create(WrappedVulkan *driver, VkDevice dev, VkDeviceSize size, uint32_t ringSize, uint32_t flags)
|
||||
{
|
||||
const VkLayerDispatchTable *vt = ObjDisp(dev);
|
||||
@@ -586,18 +588,18 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev)
|
||||
RDCCOMPILE_ASSERT(sizeof(StringUBOData) <= 4096, "font uniforms size");
|
||||
|
||||
string shaderSources[] = {
|
||||
GetEmbeddedResource(spirv_blit_vert),
|
||||
GetEmbeddedResource(spirv_checkerboard_frag),
|
||||
GetEmbeddedResource(spirv_texdisplay_frag),
|
||||
GetEmbeddedResource(spirv_text_vert),
|
||||
GetEmbeddedResource(spirv_text_frag),
|
||||
GetEmbeddedResource(spirv_mesh_vert),
|
||||
GetEmbeddedResource(spirv_mesh_geom),
|
||||
GetEmbeddedResource(spirv_mesh_frag),
|
||||
GetEmbeddedResource(spirv_minmaxtile_comp),
|
||||
GetEmbeddedResource(spirv_minmaxresult_comp),
|
||||
GetEmbeddedResource(spirv_histogram_comp),
|
||||
GetEmbeddedResource(spirv_outline_frag),
|
||||
GetEmbeddedResource(spv_blit_vert),
|
||||
GetEmbeddedResource(spv_checkerboard_frag),
|
||||
GetEmbeddedResource(spv_texdisplay_frag),
|
||||
GetEmbeddedResource(spv_text_vert),
|
||||
GetEmbeddedResource(spv_text_frag),
|
||||
GetEmbeddedResource(spv_mesh_vert),
|
||||
GetEmbeddedResource(spv_mesh_geom),
|
||||
GetEmbeddedResource(spv_mesh_frag),
|
||||
GetEmbeddedResource(spv_minmaxtile_comp),
|
||||
GetEmbeddedResource(spv_minmaxresult_comp),
|
||||
GetEmbeddedResource(spv_histogram_comp),
|
||||
GetEmbeddedResource(spv_outline_frag),
|
||||
};
|
||||
|
||||
SPIRVShaderStage shaderStages[] = {
|
||||
@@ -642,14 +644,14 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev)
|
||||
|
||||
m_CacheShaders = true;
|
||||
|
||||
sources.push_back(GetEmbeddedResource(spirv_fixedcol_frag));
|
||||
sources.push_back(GetEmbeddedResource(spv_fixedcol_frag));
|
||||
|
||||
string err = GetSPIRVBlob(eSPIRVFragment, sources, &m_FixedColSPIRV);
|
||||
RDCASSERT(err.empty() && m_FixedColSPIRV);
|
||||
|
||||
sources.resize(4);
|
||||
sources[0] = "#version 430 core\n";
|
||||
sources[1] = GetEmbeddedResource(spirv_debuguniforms_h);
|
||||
sources[1] = GetEmbeddedResource(spv_debuguniforms_h);
|
||||
sources[2] = ""; // #defines/#includes
|
||||
|
||||
for(size_t i=0; i < ARRAY_COUNT(module); i++)
|
||||
@@ -658,10 +660,10 @@ VulkanDebugManager::VulkanDebugManager(WrappedVulkan *driver, VkDevice dev)
|
||||
sources[3] = shaderSources[i];
|
||||
|
||||
if(sources[3].find("#include \"texsample.h\"") != string::npos)
|
||||
sources[2] = GetEmbeddedResource(spirv_texsample_h);
|
||||
sources[2] = GetEmbeddedResource(spv_texsample_h);
|
||||
|
||||
string err = GetSPIRVBlob(shaderStages[i], sources, &shaderSPIRV[i]);
|
||||
RDCASSERT(err.empty() && shaderSPIRV);
|
||||
RDCASSERT(err.empty() && shaderSPIRV[i]);
|
||||
|
||||
VkShaderModuleCreateInfo modinfo = {
|
||||
VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, NULL, 0,
|
||||
|
||||
@@ -221,7 +221,6 @@ class VulkanDebugManager
|
||||
VkPipeline m_OutlinePipeline;
|
||||
GPUBuffer m_OutlineUBO;
|
||||
|
||||
static const VkDeviceSize STAGE_BUFFER_BYTE_SIZE = 16*1024*1024ULL;
|
||||
GPUBuffer m_ReadbackWindow;
|
||||
|
||||
VkDescriptorSetLayout m_MeshFetchDescSetLayout;
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
HookInit(CreateXcbSurfaceKHR); \
|
||||
HookInit(GetPhysicalDeviceXcbPresentationSupportKHR);
|
||||
|
||||
#define HookInit_PlatformSpecific_Xcb() \
|
||||
#define HookDefine_PlatformSpecific_Xcb() \
|
||||
HookDefine5(VkResult, vkCreateXcbSurfaceKHR, VkInstance, instance, xcb_connection_t*, connection, xcb_window_t, window, const VkAllocationCallbacks*, pAllocator, VkSurfaceKHR*, pSurface); \
|
||||
HookDefine4(VkBool32, vkGetPhysicalDeviceXcbPresentationSupportKHR, VkPhysicalDevice, physicalDevice, uint32_t, queueFamilyIndex, xcb_connection_t*, connection, xcb_visualid_t, visual_id); \
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
HookInit(CreateXlibSurfaceKHR); \
|
||||
HookInit(GetPhysicalDeviceXlibPresentationSupportKHR);
|
||||
|
||||
#define HookInit_PlatformSpecific_Xlib() \
|
||||
#define HookDefine_PlatformSpecific_Xlib() \
|
||||
HookDefine5(VkResult, vkCreateXlibSurfaceKHR, VkInstance, instance, Display*, dpy, Window, window, const VkAllocationCallbacks*, pAllocator, VkSurfaceKHR*, pSurface); \
|
||||
HookDefine4(VkBool32, vkGetPhysicalDeviceXlibPresentationSupportKHR, VkPhysicalDevice, physicalDevice, uint32_t, queueFamilyIndex, Display*, dpy, VisualID, visualID); \
|
||||
|
||||
|
||||
@@ -445,7 +445,7 @@ bool WrappedVulkan::Serialise_SparseInitialState(ResourceId id, WrappedVkBuffer
|
||||
}
|
||||
else
|
||||
{
|
||||
info->numUniqueMems = NULL;
|
||||
info->memDataOffs = NULL;
|
||||
}
|
||||
|
||||
m_pSerialiser->Serialise("totalSize", info->totalSize);
|
||||
|
||||
@@ -46,9 +46,9 @@ void VulkanReplay::OutputWindow::SetWindowHandle(void *wn)
|
||||
screen = iter.data;
|
||||
}
|
||||
|
||||
void VulkanReplay::OutputWindow::InitSurfaceDescription(VkInstance inst)
|
||||
void VulkanReplay::OutputWindow::CreateSurface(VkInstance inst)
|
||||
{
|
||||
VkResult vkr = ObjDisp(inst)->vkCreateXcbSurfaceKHR(Unwrap(inst), connection, &wnd, NULL, &surface);
|
||||
VkResult vkr = ObjDisp(inst)->CreateXcbSurfaceKHR(Unwrap(inst), connection, wnd, NULL, &surface);
|
||||
RDCASSERT(vkr == VK_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ VkResult WrappedVulkan::vkCreateXcbSurfaceKHR(
|
||||
|
||||
// since there's no point in allocating a full resource record and storing the window
|
||||
// handle under there somewhere, we just cast. We won't use the resource record for anything
|
||||
wrapped->record = (VkResourceRecord *)window;
|
||||
wrapped->record = (VkResourceRecord *)(uintptr_t)window;
|
||||
|
||||
Keyboard::UseConnection(connection);
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ void VulkanResourceManager::MarkSparseMapReferenced(SparseMapping *sparse)
|
||||
MarkResourceFrameReferenced(GetResID(sparse->opaquemappings[i].memory), eFrameRef_Read);
|
||||
|
||||
for(int a=0; a < NUM_VK_IMAGE_ASPECTS; a++)
|
||||
for(VkDeviceSize i=0; sparse->pages[a] && i < sparse->imgdim.width*sparse->imgdim.height*sparse->imgdim.depth; i++)
|
||||
for(VkDeviceSize i=0; sparse->pages[a] && i < VkDeviceSize(sparse->imgdim.width*sparse->imgdim.height*sparse->imgdim.depth); i++)
|
||||
MarkResourceFrameReferenced(GetResID(sparse->pages[a][i].first), eFrameRef_Read);
|
||||
}
|
||||
|
||||
|
||||
@@ -903,7 +903,7 @@ bool VulkanReplay::RenderTextureInternal(TextureDisplay cfg, VkRenderPassBeginIn
|
||||
VkImageAspectFlags aspectFlags = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
|
||||
int displayformat = 0;
|
||||
int descSetBinding = 0;
|
||||
uint32_t descSetBinding = 0;
|
||||
|
||||
if(IsUIntFormat(iminfo.format))
|
||||
{
|
||||
@@ -1557,6 +1557,9 @@ void VulkanReplay::RenderMesh(uint32_t frameID, uint32_t eventID, const vector<M
|
||||
case eShade_Secondary:
|
||||
pipe = cache.pipes[MeshDisplayPipelines::ePipe_Secondary];
|
||||
break;
|
||||
case eShade_None:
|
||||
case eShade_Count:
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t uboOffs = 0;
|
||||
|
||||
@@ -243,7 +243,7 @@ class VulkanReplay : public IReplayDriver
|
||||
|
||||
bool RenderTextureInternal(TextureDisplay cfg, VkRenderPassBeginInfo rpbegin, bool f32render);
|
||||
|
||||
void VulkanReplay::CreateTexImageView(VkImageAspectFlags aspectFlags, VkImage liveIm, VulkanCreationInfo::Image &iminfo);
|
||||
void CreateTexImageView(VkImageAspectFlags aspectFlags, VkImage liveIm, VulkanCreationInfo::Image &iminfo);
|
||||
|
||||
void FillCBufferVariables(rdctype::array<ShaderConstant>, vector<ShaderVariable> &outvars, const vector<byte> &data, size_t &offset);
|
||||
|
||||
|
||||
@@ -196,8 +196,7 @@ int renderdoccmd(int argc, char **argv)
|
||||
byte *jpgbuf = new byte[len];
|
||||
RENDERDOC_GetThumbnail(argv[2], jpgbuf, len);
|
||||
|
||||
FILE *f = NULL;
|
||||
fopen_s(&f, jpgname.c_str(), "wb");
|
||||
FILE *f = fopen(jpgname.c_str(), "wb");
|
||||
|
||||
if(!f)
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)renderdocshim\;$(SolutionDir)renderdoc\api\;$(SolutionDir)renderdoc\3rdparty\</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
@@ -109,7 +109,7 @@
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;WIN64;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;WIN64;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)renderdocshim\;$(SolutionDir)renderdoc\api\;$(SolutionDir)renderdoc\3rdparty\</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
@@ -128,7 +128,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;RELEASE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;RENDERDOC_PLATFORM=win32;NDEBUG;RELEASE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)renderdocshim\;$(SolutionDir)renderdoc\api\;$(SolutionDir)renderdoc\3rdparty\</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
@@ -148,7 +148,7 @@
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;WIN64;RENDERDOC_PLATFORM=win32;NDEBUG;RELEASE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_WARNINGS;WIN64;RENDERDOC_PLATFORM=win32;NDEBUG;RELEASE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)renderdocshim\;$(SolutionDir)renderdoc\api\;$(SolutionDir)renderdoc\3rdparty\</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
@@ -192,4 +192,4 @@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -99,7 +99,7 @@ void DisplayRendererPreview(ReplayRenderer *renderer, TextureDisplay displayCfg)
|
||||
|
||||
void *connectionScreenWindow[] = { (void *)connection, (void *)(uintptr_t)scr, (void *)(uintptr_t)window };
|
||||
|
||||
ReplayOutput *out = ReplayRenderer_CreateOutput(renderer, connectionScreenWindow);
|
||||
ReplayOutput *out = ReplayRenderer_CreateOutput(renderer, connectionScreenWindow, eOutputType_TexDisplay);
|
||||
|
||||
OutputConfig c = { eOutputType_TexDisplay };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user