d3d12: Update

This commit is contained in:
vlj 2015-05-19 19:43:16 +02:00 committed by Vincent Lejeune
parent 07449abfc6
commit 05d6c8df60
2 changed files with 6 additions and 2 deletions

View File

@ -35,8 +35,6 @@ std::string D3D12FragmentDecompiler::getFunction(enum class FUNCTION f)
{
default:
abort();
case FUNCTION::FUNCTION_SATURATE:
return "saturate";
case FUNCTION::FUNCTION_DP2:
return "dot($0.xy, $1.xy).xxxx";
case FUNCTION::FUNCTION_DP2A:
@ -72,6 +70,11 @@ std::string D3D12FragmentDecompiler::getFunction(enum class FUNCTION f)
}
}
std::string D3D12FragmentDecompiler::saturate(const std::string & code)
{
return "saturate(" + code + ")";
}
void D3D12FragmentDecompiler::insertHeader(std::stringstream & OS)
{
OS << "// Header" << std::endl;

View File

@ -10,6 +10,7 @@ class D3D12FragmentDecompiler : public FragmentProgramDecompiler
protected:
virtual std::string getFloatTypeName(size_t elementCount) override;
virtual std::string getFunction(enum class FUNCTION) override;
virtual std::string saturate(const std::string &code) override;
virtual void insertHeader(std::stringstream &OS) override;
virtual void insertIntputs(std::stringstream &OS) override;