Commit 8b0a281f by Chris Forbes

Add builtin interface to spirv shader

Initial structures to bridge the shader's use of particular builtins to behavior of the "fixed function" logic wrapped around it. Bug: b/120799499 Change-Id: I5cb360909c62615efab2e500f5c24109737e4ab7 Reviewed-on: https://swiftshader-review.googlesource.com/c/23709Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 2e7f35b4
......@@ -127,6 +127,7 @@ namespace sw
bool DepthGreater : 1;
bool DepthLess : 1;
bool DepthUnchanged : 1;
bool ContainsKill : 1;
// Compute workgroup dimensions
int LocalSizeX, LocalSizeY, LocalSizeZ;
......@@ -146,11 +147,18 @@ namespace sw
ATTRIBTYPE_LAST = ATTRIBTYPE_UINT
};
bool hasBuiltinInput(spv::BuiltIn b) const
{
return inputBuiltins.find(b) != inputBuiltins.end();
}
private:
const int serialID;
static volatile int serialCounter;
Modes modes;
std::unordered_map<uint32_t, Object> defs;
std::unordered_map<spv::BuiltIn, uint32_t> inputBuiltins;
std::unordered_map<spv::BuiltIn, uint32_t> outputBuiltins;
void ProcessExecutionMode(InsnIterator it);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment