46 struct VertexDescriptorShaderInterfacePair {
58 class MTLVertexDescriptorCache {
68 MTLVertexDescriptorCache(
MTLBatch *batch) : batch_(batch) {};
69 VertexDescriptorShaderInterfacePair *find(
const ShaderInterface *interface);
70 bool insert(VertexDescriptorShaderInterfacePair &
data);
73 void vertex_descriptor_cache_init(
MTLContext *ctx);
74 void vertex_descriptor_cache_clear();
75 void vertex_descriptor_cache_ensure();
80 MTLVertexDescriptorCache vao_cache = {
this};
85 uint32_t topology_buffer_input_v_count_ = 0;
86 uint32_t topology_buffer_output_v_count_ = 0;
92 void draw(
int v_first,
int v_count,
int i_first,
int i_count)
override;
115 return active_shader_;
119 void draw_advanced(
int v_first,
int v_count,
int i_first,
int i_count);
121 void draw_advanced_indirect_internal(
StorageBuf *indirect_buf,
138 MEM_CXX_CLASS_ALLOC_FUNCS(
"MTLBatch");