Program Listing for File sampler-info.h

Return to documentation for file (include\playback\resource-info\sampler-info.h)

/******************************************************************************

© Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.

 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "playback/resource-info/resource-info.h"

namespace gpa {
namespace playback {

class SamplerInfo final
    : public ResourceInfo
{
public:
    TypeId GetTypeId() const override final;

    api_types::FilterMode minFilter{api_types::GPA_FILTER_MODE_UNKNOWN};
    api_types::FilterMode magFilter{api_types::GPA_FILTER_MODE_UNKNOWN};
    api_types::FilterMode mipFilter{api_types::GPA_FILTER_MODE_UNKNOWN};
    api_types::AddressMode addressModeU{api_types::GPA_ADDRESS_MODE_UNKNOWN};
    api_types::AddressMode addressModeV{api_types::GPA_ADDRESS_MODE_UNKNOWN};
    api_types::AddressMode addressModeW{api_types::GPA_ADDRESS_MODE_UNKNOWN};
    float mipLodBias{0};
    bool anisotropyEnabled{false};
    float maxAnisotropy{0};
    bool compareEnabled{false};
    api_types::ComprisonFunction comparisonFunction{api_types::GPA_COMPARISON_FUNCTION_UNKNOWN};
    float minLod{0};
    float maxLod{0};
    bool unnormalizedCoordinates{false};
    float borderColor[4]{0, 0, 0, 0};
};

namespace detail {

template<>
inline auto MakeTuple<SamplerInfo>(const SamplerInfo& samplerInfo)
{
    return std::make_tuple(
        samplerInfo.minFilter,
        samplerInfo.magFilter,
        samplerInfo.mipFilter,
        samplerInfo.addressModeU,
        samplerInfo.addressModeV,
        samplerInfo.addressModeW,
        samplerInfo.mipLodBias,
        samplerInfo.anisotropyEnabled,
        samplerInfo.maxAnisotropy,
        samplerInfo.compareEnabled,
        samplerInfo.comparisonFunction,
        samplerInfo.minLod,
        samplerInfo.maxLod,
        samplerInfo.unnormalizedCoordinates,
        samplerInfo.borderColor[0],
        samplerInfo.borderColor[1],
        samplerInfo.borderColor[2],
        samplerInfo.borderColor[3]);
}

}  // namespace detail
}  // namespace playback
}  // namespace gpa