Commit cb7a696
authored
PIX: Use DebugLoc for filenames instead of file list (#4077)
This fix is for shaders (in particular those for materials from Unreal Engine) that feature #line directives.
In the UE case, for example, there is one source file called hlsl.hlsl, with many #line directives pointing to the original HLSL files from which the source was assembled via UE's material system.
At the start of shader debugging, all the filenames from DebugLoc are returned from code near here to PIX. Those filenames are the ones from the #line directives.
The previous code would iterate over source file names (which in the UE case would be just hlsl.hlsl), and fail to find the filename that PIX is now asking to find the instructions for.
Instead, we now gather the filenames from the DebugLoc. Note that the filename comparison is done after the line number comparison for performance's sake.1 parent e4ddf78 commit cb7a696
1 file changed
Lines changed: 16 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
192 | 188 | | |
193 | | - | |
194 | | - | |
| 189 | + | |
| 190 | + | |
195 | 191 | | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 192 | + | |
201 | 193 | | |
202 | 194 | | |
203 | 195 | | |
| |||
0 commit comments