#define DALI_GRAPHICS_REFLECTION_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// Sampler
/**
- * @brief Gets all the sampler uniforms
+ * @brief Gets all the sampler uniforms. In the case of arrays of samplers,
+ * it contains only the name of the sampler array without the [N] size, but,
+ * the element count is set to N.
*
* @return A vector of the sampler uniforms
*/
uint32_t bufferIndex{0u};
uint32_t offset{0u};
uint32_t location{0u};
+ uint32_t elementCount{0u};
bool operator==(const UniformInfo& rhs)
{
binding == rhs.binding &&
bufferIndex == rhs.bufferIndex &&
offset == rhs.offset &&
- location == rhs.location;
+ location == rhs.location &&
+ elementCount == rhs.elementCount;
}
};
/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
}
// add samplers
- auto samplers = graphicsReflection.GetSamplers();
+ auto samplers = graphicsReflection.GetSamplers(); // Only holds first element of arrays without [].
for(const auto& sampler : samplers)
{
mReflection.emplace_back(ReflectionUniformInfo{CalculateHash(sampler.name), false, sampler});