mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-29 13:20:54 +00:00
Add D3D12 Shader Debug tests for SM6.4 instructions
dot4add_i8packed dot4add_u8packed dot2add
This commit is contained in:
@@ -866,6 +866,31 @@ float4 main(v2f IN) : SV_Target0
|
||||
return inttexrwtest[uv];
|
||||
}
|
||||
#endif // #if SM_6_0 || SM_6_2 || SM_6_6
|
||||
#if SM_6_6
|
||||
if(IN.tri == 94)
|
||||
{
|
||||
uint a = IN.tri - 94 + 0x01020304;
|
||||
uint b = IN.tri - 94 + 0x05060708;
|
||||
uint c = IN.tri - 94 + 0x090a0b0c;
|
||||
uint res = dot4add_i8packed(a, b, c);
|
||||
return float4(res & 0xFF, (res >> 8) & 0xFF, (res >> 16) & 0xFF, (res >> 24) & 0xFF);
|
||||
}
|
||||
if(IN.tri == 95)
|
||||
{
|
||||
uint a = IN.tri - 94 + 0x01020304;
|
||||
uint b = IN.tri - 94 + 0x05060708;
|
||||
uint c = IN.tri - 94 + 0x090a0b0c;
|
||||
uint res = dot4add_u8packed(a, b, c);
|
||||
return float4(res & 0xFF, (res >> 8) & 0xFF, (res >> 16) & 0xFF, (res >> 24) & 0xFF);
|
||||
}
|
||||
if(IN.tri == 96)
|
||||
{
|
||||
half2 a = half2(IN.tri - 96 + 0.1f, IN.tri - 96 + 0.2f);
|
||||
half2 b = half2(IN.tri - 96 + 0.2f, IN.tri - 96 + 0.3f);
|
||||
float c = IN.tri - 96 + 0.3f;
|
||||
return dot2add(a, b, c);
|
||||
}
|
||||
#endif // #if SM_6_6
|
||||
|
||||
return float4(0.4f, 0.4f, 0.4f, 0.4f);
|
||||
}
|
||||
|
||||
@@ -1335,8 +1335,8 @@ ID3DBlobPtr D3D12GraphicsTest::Compile(std::string src, std::string entry, std::
|
||||
uint32_t compileOptions)
|
||||
{
|
||||
ID3DBlobPtr blob = NULL;
|
||||
bool skipoptimise = (compileOptions && CompileOptionFlags::SkipOptimise);
|
||||
bool enable16BitTypes = (compileOptions && CompileOptionFlags::Enable16BitTypes);
|
||||
bool skipoptimise = ((compileOptions & CompileOptionFlags::SkipOptimise) != 0);
|
||||
bool enable16BitTypes = ((compileOptions & CompileOptionFlags::Enable16BitTypes) != 0);
|
||||
|
||||
if(profile[3] >= '6')
|
||||
{
|
||||
@@ -1390,10 +1390,12 @@ ID3DBlobPtr D3D12GraphicsTest::Compile(std::string src, std::string entry, std::
|
||||
argStorage.push_back(L"-O1");
|
||||
}
|
||||
argStorage.push_back(L"-Zi");
|
||||
argStorage.push_back(L"-Qembed_debug");
|
||||
if(enable16BitTypes)
|
||||
argStorage.push_back(L"-enable-16bit-types");
|
||||
|
||||
// Must be the final option
|
||||
argStorage.push_back(L"-Qembed_debug");
|
||||
|
||||
for(size_t i = 0; i < argStorage.size(); i++)
|
||||
args[0].push_back(argStorage[i].c_str());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user