-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New spirv introspection #677
Conversation
outBinding.type = binding.type; | ||
outBinding.stageFlags = binding.stageMask; | ||
outBinding.createFlags = ICPUDescriptorSetLayout::SBinding::E_CREATE_FLAGS::ECF_NONE; | ||
// TODO: outBinding.samplers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you cannot use immutable samplers, because HLSL doesn't give you any info about what such a sampler should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPIR-V in general doesn't
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the TODO and correct the comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done?
} | ||
else | ||
{ | ||
getTypeStore()->typeName = addString("TODO"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could actually find the name of a type because whenever one defines a type in SPIR-V they use OpType...
which gives them a result ID (integer)
in vec4 color1;
in vec4 multiplier;
noperspective in vec4 color2;
out vec4 color;
struct S {
bool b;
vec4 v[5];
int i;
};
uniform blockName {
S s;
bool cond;
};
this is the SPIR-V that generates them
%6 = OpTypeFloat 32 ; 32-bit float
%7 = OpTypeVector %6 4 ; vec4
%10 = OpConstant %6 1
%11 = OpConstant %6 2
%13 = OpTypeInt 32 0 ; 32-bit int, sign-less
%14 = OpConstant %13 5
%15 = OpTypeArray %7 %14
%16 = OpTypeInt 32 1
%17 = OpTypeStruct %13 %15 %16
%18 = OpTypeStruct %17 %13
and in the debug info you'll have
OpName %17 "S"
OpMemberName %17 0 "b"
OpMemberName %17 1 "v"
OpMemberName %17 2 "i"
OpName %18 "blockName"
OpMemberName %18 0 "s"
OpMemberName %18 1 "cond"
Note that depending on the compiler, anything thats an OpTypeFloat
, OpTypeInt
, OpTypeVector
or OpTypeArray
might not get debug names so we should probably build outselves.
You don't need to do all this right now, because I want you to progress to other tasks, but would be good to write it up here and open a GH issue about it for later fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add this as a block comment on this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the concents of the first comment as block comment on this line
<< "id: " << specConstant.id << " byte size: " << "TODO: specConstant.defaultValue" << '\n'; | ||
} | ||
{ | ||
// TODO: it gives weird errors, debug |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe doesn't have \0
at end of span OR it was forgotten about during the mutable->imutable conversion from based_span to regular span
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, will commit soon
tools/nsc/.profiles/0.json
Outdated
{ | ||
"cmake" : | ||
{ | ||
"buildModes" : [], | ||
"configurations" : [ "Release", "Debug", "RelWithDebInfo" ], | ||
"requiredOptions" : [] | ||
}, | ||
"enableParallelBuild" : true, | ||
"input" : | ||
{ | ||
"data" : | ||
[ | ||
{ | ||
"command" : "../bin/nsc.exe", | ||
"dependencies" : [] | ||
} | ||
], | ||
"dependencies" : [] | ||
}, | ||
"isExecuted" : true, | ||
"profile" : | ||
{ | ||
"backend" : "vulkan", | ||
"buildModes" : [], | ||
"gpuArchitectures" : [], | ||
"platform" : "windows", | ||
"runConfiguration" : "Release" | ||
}, | ||
"scriptPath" : "../test/test.py", | ||
"threadsPerBuildProcess" : 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove these files, they're temp
you've accidentally added the OpenSSL module back |
2e24df2
to
7fa5a90
Compare
No description provided.