Loading...
Searching...
No Matches
textureBinder.h
1//
2// Copyright 2020 Pixar
3//
4// Licensed under the Apache License, Version 2.0 (the "Apache License")
5// with the following modification; you may not use this file except in
6// compliance with the Apache License and the following modification to it:
7// Section 6. Trademarks. is deleted and replaced with:
8//
9// 6. Trademarks. This License does not grant permission to use the trade
10// names, trademarks, service marks, or product names of the Licensor
11// and its affiliates, except as required to comply with Section 4(c) of
12// the License and to reproduce the content of the NOTICE file.
13//
14// You may obtain a copy of the Apache License at
15//
16// http://www.apache.org/licenses/LICENSE-2.0
17//
18// Unless required by applicable law or agreed to in writing, software
19// distributed under the Apache License with the above modification is
20// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21// KIND, either express or implied. See the Apache License for the specific
22// language governing permissions and limitations under the Apache License.
23//
24#ifndef PXR_IMAGING_HD_ST_TEXTURE_BINDER_H
25#define PXR_IMAGING_HD_ST_TEXTURE_BINDER_H
26
27#include "pxr/pxr.h"
28#include "pxr/imaging/hdSt/api.h"
29#include "pxr/imaging/hdSt/shaderCode.h"
30
31PXR_NAMESPACE_OPEN_SCOPE
32
33using HdBufferSpecVector = std::vector<struct HdBufferSpec>;
35
45class HdSt_TextureBinder {
46public:
47 using NamedTextureHandle =
49 using NamedTextureHandleVector =
50 HdStShaderCode::NamedTextureHandleVector;
51
55 static void
56 GetBufferSpecs(
57 const NamedTextureHandleVector &textures,
58 HdBufferSpecVector * specs,
59 bool doublesSupported);
60
69 static void
70 ComputeBufferSources(
71 const NamedTextureHandleVector &textures,
72 HdBufferSourceSharedPtrVector * sources,
73 bool doublesSupported);
74
77 static void
78 BindResources(
79 HdSt_ResourceBinder const &binder,
80 const NamedTextureHandleVector &textures);
81
84 static void
85 UnbindResources(
86 HdSt_ResourceBinder const &binder,
87 const NamedTextureHandleVector &textures);
88
91 static void
92 GetBindingDescs(
93 HdSt_ResourceBinder const &binder,
94 HgiResourceBindingsDesc * bindingsDesc,
95 const NamedTextureHandleVector &textures);
96
97};
98
99PXR_NAMESPACE_CLOSE_SCOPE
100
101#endif // PXR_IMAGING_HD_ST_TEXTURE_BINDER_H
Information necessary to bind textures and create accessor for the texture.
Definition: shaderCode.h:142
Describes a set of resources that are bound to the GPU during encoding.