MCPcopy Create free account
hub / github.com/Tencent/tgfx / getSamplers

Method getSamplers

src/gpu/ProgramInfo.cpp:197–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195}
196
197std::vector<SamplerInfo> ProgramInfo::getSamplers() const {
198 std::vector<SamplerInfo> samplers = {};
199 for (size_t i = 0; i < geometryProcessor->numTextureSamplers(); i++) {
200 SamplerInfo sampler = {geometryProcessor->textureAt(i), geometryProcessor->samplerStateAt(i)};
201 samplers.push_back(sampler);
202 }
203 FragmentProcessor::Iter iter(this);
204 const FragmentProcessor* fp = iter.next();
205 while (fp) {
206 for (size_t i = 0; i < fp->numTextureSamplers(); ++i) {
207 SamplerInfo sampler = {fp->textureAt(i), fp->samplerStateAt(i)};
208 samplers.push_back(sampler);
209 }
210 fp = iter.next();
211 }
212 auto dstTextureView = xferProcessor != nullptr ? xferProcessor->dstTextureView() : nullptr;
213 if (dstTextureView != nullptr) {
214 SamplerInfo sampler = {dstTextureView->getTexture(), {}};
215 samplers.push_back(sampler);
216 }
217 return samplers;
218}
219
220void ProgramInfo::updateUniformBufferSuffix(UniformBuffer* vertexUniformBuffer,
221 UniformBuffer* fragmentUniformBuffer,

Callers 1

finalizeMethod · 0.80

Calls 6

numTextureSamplersMethod · 0.45
textureAtMethod · 0.45
samplerStateAtMethod · 0.45
nextMethod · 0.45
dstTextureViewMethod · 0.45
getTextureMethod · 0.45

Tested by

no test coverage detected