Skip to content

Commit

Permalink
rgl: Turn off shader optimizations in debug mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Mar 22, 2016
1 parent c47d03f commit f3b036b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Layers/xrRenderPC_GL/rgl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,11 @@ HRESULT CRender::shader_compile(
string256 name_comment;
sprintf_s(name_comment, "// %s\n", name);
const char** sources = xr_alloc<const char*>(sources_len);
#ifdef DEBUG
sources[0] = "#version 410\n#pragma optimize (off)\n";
#else
sources[0] = "#version 410\n";
#endif
sources[1] = name_comment;
memcpy(sources + 2, defines, def_len * sizeof(char*));
memcpy(sources + def_len + 2, source.data(), source.size() * sizeof(char*));
Expand Down

0 comments on commit f3b036b

Please sign in to comment.