Reflect multiple entry points & ray properties from DXIL shaders

This commit is contained in:
baldurk
2024-04-26 13:55:19 +01:00
parent 476fed06d6
commit 7e7bbf58a8
13 changed files with 268 additions and 20 deletions
+5 -5
View File
@@ -125,7 +125,7 @@ struct rdcflatmap
size_t idx = lower_bound_idx(val.first);
bool inserted = false;
if(idx >= size() || storage.at(idx).first != val.first)
if(idx >= size() || !(storage.at(idx).first == val.first))
{
storage.insert(idx, val);
inserted = true;
@@ -141,7 +141,7 @@ struct rdcflatmap
size_t idx = lower_bound_idx(val.first);
bool inserted = false;
if(idx >= size() || storage.at(idx).first != val.first)
if(idx >= size() || !(storage.at(idx).first == val.first))
{
storage.insert(idx, std::move(val));
inserted = true;
@@ -203,7 +203,7 @@ private:
iterator sorted_find(const Key &id)
{
size_t idx = lower_bound_idx(id);
if(idx >= size() || storage.at(idx).first != id)
if(idx >= size() || !(storage.at(idx).first == id))
return end();
return begin() + idx;
@@ -212,7 +212,7 @@ private:
const_iterator sorted_find(const Key &id) const
{
size_t idx = lower_bound_idx(id);
if(idx >= size() || storage.at(idx).first != id)
if(idx >= size() || !(storage.at(idx).first == id))
return end();
return begin() + idx;
@@ -228,7 +228,7 @@ private:
Value &sorted_at(const Key &id)
{
size_t idx = lower_bound_idx(id);
if(idx >= size() || storage.at(idx).first != id)
if(idx >= size() || !(storage.at(idx).first == id))
{
storage.insert(idx, {id, Value()});
}
+20
View File
@@ -1753,6 +1753,26 @@ input payload (for mesh shaders)
:type: ConstantBlock
)");
ConstantBlock taskPayload;
DOCUMENT(R"(The block layout of the ray payload.
Only relevant for raytracing shaders, this gives the payload accessible for read and write by ray
evaluation during the processing of the ray
:type: ConstantBlock
)");
ConstantBlock rayPayload;
DOCUMENT(R"(The block layout of the ray attributes structure.
Only relevant for intersection shaders and closest/any hit shaders, this gives
the attributes structure produced by a custom intersection shader which is available by hit shaders,
or else the built-in structure if no intersection shader was used and a triangle intersection is
reported.
:type: ConstantBlock
)");
ConstantBlock rayAttributes;
};
DECLARE_REFLECTION_STRUCT(ShaderReflection);