|
Map D3D calls and HLSL shaders back to GLES2 calls and GLSL ES shaders in PIX.
This makes debugging and profiling using PIX a lot more convenient. The top level of events are the GLES calls with their arguments. Those can be expanded to see the D3D calls that were issued for a particular GLES call.
When PIX is attached, the shaders are saved out to temporary files and referenced from the translated HLSL shaders via #line directives. This enabled source level debugging of the original GLSL from PIX for pixel and vertex shaders. The HLSL is also saved to a temporary file so that intrinsic functions like texture2D can be stepped into.
It also avoids creating a text file in the current working directory, which has continued to be an issue.
I made the dependency on d3d9.dll static again so it can be accessed by GetModuleHandle witihin DllMain.
I added an EVENT macro that issues D3DPERF_BeginEvent and D3DPERF_EndEvent around a C++ block. I replaced TRACE with EVENT for all the entry points.
I removed the tracing of shader source since the source is visible in PIX.
The means by which the filename of the temporary shader file is passed into the shader compiler is a little clunky. I did it that way to avoid changing the function signatures and breaking folks using the translator.
I plan to make the compiler respect #pragma optimize so that optimization can be disabled for debugging purposes. For now it just disables shader optimization in debug builds of ANGLE.
Committed: http://code.google.com/p/angleproject/source/detail?r=541
Total comments: 20
Total comments: 1
Total comments: 9
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+535 lines, -305 lines) |
Patch |
|
M |
include/GLSLANG/ShaderLang.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
src/build_angle.gyp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+6 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/common/debug.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+58 lines, -20 lines |
0 comments
|
Download
|
|
M |
src/common/debug.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+96 lines, -44 lines |
0 comments
|
Download
|
|
M |
src/common/version.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
src/compiler/Compiler.cpp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+13 lines, -3 lines |
0 comments
|
Download
|
|
M |
src/compiler/OutputHLSL.h
|
View
|
1
2
3
4
5
6
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
src/compiler/OutputHLSL.cpp
|
View
|
1
2
3
4
5
6
|
11 chunks |
+55 lines, -14 lines |
0 comments
|
Download
|
|
M |
src/compiler/ParseHelper.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/glslang.y
|
View
|
1
2
3
4
5
6
|
3 chunks |
+9 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/compiler/glslang_tab.cpp
|
View
|
1
2
3
4
5
6
|
4 chunks |
+14 lines, -7 lines |
0 comments
|
Download
|
|
M |
src/compiler/intermediate.h
|
View
|
1
2
3
4
5
6
|
3 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
src/libEGL/Display.cpp
|
View
|
1
2
3
4
5
6
|
3 chunks |
+2 lines, -12 lines |
0 comments
|
Download
|
|
M |
src/libEGL/libEGL.cpp
|
View
|
1
2
3
4
5
6
|
34 chunks |
+34 lines, -34 lines |
0 comments
|
Download
|
|
M |
src/libEGL/libEGL.vcproj
|
View
|
1
2
3
4
5
6
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/libEGL/main.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/Program.cpp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+18 lines, -4 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/Shader.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+24 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/libGLESv2.cpp
|
View
|
1
2
3
4
5
6
|
135 chunks |
+135 lines, -135 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/libGLESv2.vcproj
|
View
|
1
2
3
4
5
6
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/main.cpp
|
View
|
1
2
3
4
5
6
|
1 chunk |
+5 lines, -5 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/utilities.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
src/libGLESv2/utilities.cpp
|
View
|
1
2
3
4
5
6
|
2 chunks |
+35 lines, -0 lines |
0 comments
|
Download
|
Total messages: 15
|