summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-01-03 10:17:17 -0800
committerGitHub <noreply@github.com>2018-01-03 10:17:17 -0800
commit51f0701989ac4730cd87f0d8c656a1c6b1618255 (patch)
tree5f8846403385297663315087bd7cc0fb85edbe8c /source
parent1e0aabf4b28f48bfbfee7b1a9c08031892c004d0 (diff)
Fix struct decl order again (#348)
* Add core.natvis file to Slang DLL build It seems that when `slang.dll` gets loaded into a user's project, the debugger is able to pick up the custom visualizers implemented in `slang.natvis` (which is directly added to the DLL project) but not `core.natvis` (which is added to a static library project that the DLL project references). Adding `core.natvis` to the DLL project directly seems to resolve this and greatly improve the debugging experience when in user code. * Bug fix: emit type of CB before CB when using IR The problem here was the logic for emitting types used by an IR declaration before the declaration. I refactored it to share logic between variables with initializers and functions, but in doing so failed to have an ordinary variable (which includes constant buffers) ensure that its own type was emitted before the variable. This is a one-line fix.
Diffstat (limited to 'source')
-rw-r--r--source/slang/emit.cpp1
-rw-r--r--source/slang/slang.vcxproj1
-rw-r--r--source/slang/slang.vcxproj.filters1
3 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 080478225..e60941e50 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -7122,6 +7122,7 @@ emitDeclImpl(decl, nullptr);
case kIROp_global_var:
{
auto irGlobal = (IRGlobalVar*) value;
+ emitIRUsedType(ctx, irGlobal->type);
emitIRUsedTypesForGlobalValueWithCode(ctx, irGlobal);
}
break;
diff --git a/source/slang/slang.vcxproj b/source/slang/slang.vcxproj
index 9835640e0..21ed1504c 100644
--- a/source/slang/slang.vcxproj
+++ b/source/slang/slang.vcxproj
@@ -165,6 +165,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
+ <Natvis Include="..\core\core.natvis" />
<Natvis Include="slang.natvis" />
</ItemGroup>
<ItemGroup>
diff --git a/source/slang/slang.vcxproj.filters b/source/slang/slang.vcxproj.filters
index f207c6dcd..e147e60d6 100644
--- a/source/slang/slang.vcxproj.filters
+++ b/source/slang/slang.vcxproj.filters
@@ -2,6 +2,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Natvis Include="slang.natvis" />
+ <Natvis Include="..\core\core.natvis" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="compiler.h" />