Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwak-work committed Oct 28, 2024
1 parent 5e6e0dc commit 5fefdd3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions tests/bugs/extension-lifetime.slang
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

// This test is a regresion test for a bug where `extension`
// declarations are incorrectly being cached on the declarations
// they extend, so that an extension of a stdlib type (like `float`)
// they extend, so that an extension of a core module type (like `float`)
// ends up attaching a declaration from one compile request to that
// type, and then later compile requests that use that stdlib type
// type, and then later compile requests that use the core module type
// try to look up through that extension even though (1) that
// shouldn't make sense semantically, and (2) that extension will
// have been deallocated when its parent compile request was
// destroyed.
//
// This test relies on the fact that our test runner uses a single
// slang compilation session (which loads the stdlib code) across
// slang compilation session (which loads the core module code) across
// multiple compilation tests. We can thus make this file contain
// two identical tests, with the knowledge that the second one
// will lead to the bad/crashing behavior if the first one ran
Expand Down
4 changes: 2 additions & 2 deletions tests/diagnostics/bad-operator-call.slang
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

// Test that bad calls to operators produce reasonable diagnostic messages.

// Note: This test is currently Windows-only becase our Linux builds
// seem to print references to the stdlib code with paths that don't
// Note: This test is currently Windows-only because our Linux builds
// seem to print references to the core module code with paths that don't
// match the Windows build (which generated our baseline).

struct S {}
Expand Down
4 changes: 2 additions & 2 deletions tests/hlsl-intrinsic/matrix-double.slang
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// TODO(JS):
// It doesn't look like fxc, dxc, vk support double versions of many of the intrinsics, so they are disabled here.
// Arguably we should implement simple intrinsics if missing in the stdlib
// Arguably we should implement simple intrinsics if missing in the core module.
// More complicated functions (like say sin) can also be written, if not available on a target, but requires significant
// care.

Expand Down Expand Up @@ -149,4 +149,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
test2(ft, f);

outputBuffer[idx] = calcTotal(ft);
}
}
4 changes: 2 additions & 2 deletions tests/hlsl-intrinsic/wave.slang
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID)
/// value |= (product << 8);

// TODO(JS): NOTE! This only works with uint, *NOT* int on HLSL/DXC.
// We need to update the stdlib to reflect this.
// We need to update the core module to reflect this.
uint xor = WaveActiveBitXor(uint(idx + 1));
value |= int(xor << 12);

outputBuffer[idx] = value;
}
}

0 comments on commit 5fefdd3

Please sign in to comment.