Trying to fix invalid descriptorlayout
This commit is contained in:
@@ -14,65 +14,50 @@ struct ExpressionOutput
|
||||
struct ShaderExpression
|
||||
{
|
||||
};
|
||||
DECLARE_NAME_REF(Gfx, DescriptorSet);
|
||||
struct ShaderParameter : public ShaderExpression
|
||||
{
|
||||
std::string name;
|
||||
uint32 byteOffset;
|
||||
uint32 binding;
|
||||
ShaderParameter(std::string name, uint32 byteOffset, uint32 binding);
|
||||
virtual ~ShaderParameter();
|
||||
// update a descriptorset, in case of a uniform buffer, copy the data to the dst + byteOffset
|
||||
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) = 0;
|
||||
};
|
||||
DEFINE_REF(ShaderParameter);
|
||||
struct FloatParameter : public ShaderParameter
|
||||
{
|
||||
float defaultValue;
|
||||
bool setParameter(const std::string& paramName, float newDefault)
|
||||
{
|
||||
if(name.compare(paramName) == 0)
|
||||
{
|
||||
defaultValue = newDefault;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
float data;
|
||||
FloatParameter(std::string name, uint32 byteOffset, uint32 binding);
|
||||
virtual ~FloatParameter();
|
||||
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
||||
};
|
||||
DEFINE_REF(FloatParameter);
|
||||
struct VectorParameter : public ShaderParameter
|
||||
{
|
||||
Vector defaultValue;
|
||||
bool setParameter(const std::string& paramName, Vector newDefault)
|
||||
{
|
||||
if(name.compare(paramName) == 0)
|
||||
{
|
||||
defaultValue = newDefault;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Vector data;
|
||||
VectorParameter(std::string name, uint32 byteOffset, uint32 binding);
|
||||
virtual ~VectorParameter();
|
||||
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
||||
};
|
||||
DEFINE_REF(VectorParameter);
|
||||
DECLARE_NAME_REF(Gfx, Texture2D);
|
||||
DECLARE_REF(TextureAsset);
|
||||
struct TextureParameter : public ShaderParameter
|
||||
{
|
||||
Gfx::PTexture2D defaultValue;
|
||||
bool setParameter(const std::string& paramName, Gfx::PTexture2D newDefault)
|
||||
{
|
||||
if(name.compare(paramName) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
PTextureAsset data;
|
||||
TextureParameter(std::string name, uint32 byteOffset, uint32 binding);
|
||||
virtual ~TextureParameter();
|
||||
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
||||
};
|
||||
DEFINE_REF(TextureParameter);
|
||||
DECLARE_NAME_REF(Gfx, SamplerState);
|
||||
struct SamplerParameter : public ShaderParameter
|
||||
{
|
||||
Gfx::PSamplerState defaultValue;
|
||||
bool setParameter(const std::string& paramName, Gfx::PSamplerState newDefault)
|
||||
{
|
||||
if(name.compare(paramName) == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
Gfx::PSamplerState data;
|
||||
SamplerParameter(std::string name, uint32 byteOffset, uint32 binding);
|
||||
virtual ~SamplerParameter();
|
||||
virtual void updateDescriptorSet(Gfx::PDescriptorSet descriptorSet, uint8* dst) override;
|
||||
};
|
||||
DEFINE_REF(SamplerParameter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user