Ensures that bindings on the pass are not redundantly set or updated. Avoids making the driver do additional checks and makes the frame insights during profiling and instrumentation not complain about the same. More...
#include <pass_bindings_cache.h>
Public Member Functions | |
| PassBindingsCache (id< MTLRenderCommandEncoder > encoder) | |
| PassBindingsCache (const PassBindingsCache &)=delete | |
| PassBindingsCache (PassBindingsCache &&)=delete | |
| void | SetRenderPipelineState (id< MTLRenderPipelineState > pipeline) |
| void | SetDepthStencilState (id< MTLDepthStencilState > depth_stencil) |
| bool | SetBuffer (ShaderStage stage, uint64_t index, uint64_t offset, id< MTLBuffer > buffer) |
| bool | SetTexture (ShaderStage stage, uint64_t index, id< MTLTexture > texture) |
| bool | SetSampler (ShaderStage stage, uint64_t index, id< MTLSamplerState > sampler) |
| void | SetViewport (const Viewport &viewport) |
| void | SetScissor (const IRect &scissor) |
| void | BindPipeline (vk::CommandBuffer command_buffer, vk::PipelineBindPoint pipeline_bind_point, vk::Pipeline pipeline) |
| void | SetStencilReference (vk::CommandBuffer command_buffer, vk::StencilFaceFlags face_mask, uint32_t reference) |
| void | SetScissor (vk::CommandBuffer command_buffer, uint32_t first_scissor, uint32_t scissor_count, const vk::Rect2D *scissors) |
| void | SetViewport (vk::CommandBuffer command_buffer, uint32_t first_viewport, uint32_t viewport_count, const vk::Viewport *viewports) |
Ensures that bindings on the pass are not redundantly set or updated. Avoids making the driver do additional checks and makes the frame insights during profiling and instrumentation not complain about the same.
There should be no change to rendering if this caching was absent.
Definition at line 194 of file render_pass_mtl.mm.
|
inlineexplicit |
Definition at line 195 of file render_pass_mtl.mm.
|
delete |
|
delete |
| void impeller::PassBindingsCache::BindPipeline | ( | vk::CommandBuffer | command_buffer, |
| vk::PipelineBindPoint | pipeline_bind_point, | ||
| vk::Pipeline | pipeline | ||
| ) |
Definition at line 8 of file pass_bindings_cache.cc.
Referenced by impeller::EncodeCommand(), and impeller::testing::TEST().
|
inline |
Definition at line 218 of file render_pass_mtl.mm.
References VALIDATION_LOG.
Referenced by impeller::Bind().
|
inline |
Definition at line 210 of file render_pass_mtl.mm.
|
inline |
Definition at line 202 of file render_pass_mtl.mm.
|
inline |
Definition at line 284 of file render_pass_mtl.mm.
References VALIDATION_LOG.
Referenced by impeller::Bind().
|
inline |
Definition at line 323 of file render_pass_mtl.mm.
References impeller::TSize< T >::height, impeller::TRect< T >::origin, impeller::TRect< T >::size, impeller::TSize< T >::width, impeller::TPoint< T >::x, and impeller::TPoint< T >::y.
Referenced by impeller::SetViewportAndScissor(), and impeller::testing::TEST().
| void impeller::PassBindingsCache::SetScissor | ( | vk::CommandBuffer | command_buffer, |
| uint32_t | first_scissor, | ||
| uint32_t | scissor_count, | ||
| const vk::Rect2D * | scissors | ||
| ) |
Definition at line 45 of file pass_bindings_cache.cc.
| void impeller::PassBindingsCache::SetStencilReference | ( | vk::CommandBuffer | command_buffer, |
| vk::StencilFaceFlags | face_mask, | ||
| uint32_t | reference | ||
| ) |
Definition at line 32 of file pass_bindings_cache.cc.
Referenced by impeller::EncodeCommand(), and impeller::testing::TEST().
|
inline |
Definition at line 262 of file render_pass_mtl.mm.
References VALIDATION_LOG.
Referenced by impeller::Bind().
|
inline |
Definition at line 308 of file render_pass_mtl.mm.
References impeller::Viewport::depth_range, impeller::TSize< T >::height, impeller::TRect< T >::origin, impeller::Viewport::rect, impeller::TRect< T >::size, impeller::TSize< T >::width, impeller::TPoint< T >::x, impeller::TPoint< T >::y, impeller::DepthRange::z_far, and impeller::DepthRange::z_near.
Referenced by impeller::SetViewportAndScissor(), and impeller::testing::TEST().
| void impeller::PassBindingsCache::SetViewport | ( | vk::CommandBuffer | command_buffer, |
| uint32_t | first_viewport, | ||
| uint32_t | viewport_count, | ||
| const vk::Viewport * | viewports | ||
| ) |
Definition at line 58 of file pass_bindings_cache.cc.