| 195 | } |
| 196 | |
| 197 | std::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 | |
| 220 | void ProgramInfo::updateUniformBufferSuffix(UniformBuffer* vertexUniformBuffer, |
| 221 | UniformBuffer* fragmentUniformBuffer, |
no test coverage detected