RetroArch
spirv_cross.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2015-2018 ARM Limited
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef SPIRV_CROSS_HPP
18 #define SPIRV_CROSS_HPP
19 
20 #include "spirv.hpp"
21 #include "spirv_cfg.hpp"
22 #include "spirv_common.hpp"
23 
24 namespace spirv_cross
25 {
26 struct Resource
27 {
28  // Resources are identified with their SPIR-V ID.
29  // This is the ID of the OpVariable.
31 
32  // The type ID of the variable which includes arrays and all type modifications.
33  // This type ID is not suitable for parsing OpMemberDecoration of a struct and other decorations in general
34  // since these modifications typically happen on the base_type_id.
36 
37  // The base type of the declared resource.
38  // This type is the base type which ignores pointers and arrays of the type_id.
39  // This is mostly useful to parse decorations of the underlying type.
40  // base_type_id can also be obtained with get_type(get_type(type_id).self).
42 
43  // The declared name (OpName) of the resource.
44  // For Buffer blocks, the name actually reflects the externally
45  // visible Block name.
46  //
47  // This name can be retrieved again by using either
48  // get_name(id) or get_name(base_type_id) depending if it's a buffer block or not.
49  //
50  // This name can be an empty string in which case get_fallback_name(id) can be
51  // used which obtains a suitable fallback identifier for an ID.
53 };
54 
56 {
57  std::vector<Resource> uniform_buffers;
58  std::vector<Resource> storage_buffers;
59  std::vector<Resource> stage_inputs;
60  std::vector<Resource> stage_outputs;
61  std::vector<Resource> subpass_inputs;
62  std::vector<Resource> storage_images;
63  std::vector<Resource> sampled_images;
64  std::vector<Resource> atomic_counters;
65 
66  // There can only be one push constant block,
67  // but keep the vector in case this restriction is lifted in the future.
68  std::vector<Resource> push_constant_buffers;
69 
70  // For Vulkan GLSL and HLSL source,
71  // these correspond to separate texture2D and samplers respectively.
72  std::vector<Resource> separate_images;
73  std::vector<Resource> separate_samplers;
74 };
75 
77 {
78  // The ID of the sampler2D variable.
80  // The ID of the texture2D variable.
82  // The ID of the sampler variable.
84 };
85 
87 {
88  // The ID of the specialization constant.
90  // The constant ID of the constant, used in Vulkan during pipeline creation.
92 };
93 
95 {
96  unsigned index;
97  size_t offset;
98  size_t range;
99 };
100 
102 {
109 };
110 
112 {
115 };
116 
117 class Compiler
118 {
119 public:
120  friend class CFG;
121  friend class DominatorBuilder;
122 
123  // The constructor takes a buffer of SPIR-V words and parses it.
124  Compiler(std::vector<uint32_t> ir);
125  Compiler(const uint32_t *ir, size_t word_count);
126 
127  virtual ~Compiler() = default;
128 
129  // After parsing, API users can modify the SPIR-V via reflection and call this
130  // to disassemble the SPIR-V into the desired langauage.
131  // Sub-classes actually implement this.
132  virtual std::string compile();
133 
134  // Gets the identifier (OpName) of an ID. If not defined, an empty string will be returned.
135  const std::string &get_name(uint32_t id) const;
136 
137  // Applies a decoration to an ID. Effectively injects OpDecorate.
138  void set_decoration(uint32_t id, spv::Decoration decoration, uint32_t argument = 0);
140 
141  // Overrides the identifier OpName of an ID.
142  // Identifiers beginning with underscores or identifiers which contain double underscores
143  // are reserved by the implementation.
144  void set_name(uint32_t id, const std::string &name);
145 
146  // Gets a bitmask for the decorations which are applied to ID.
147  // I.e. (1ull << spv::DecorationFoo) | (1ull << spv::DecorationBar)
148  SPIRV_CROSS_DEPRECATED("Please use get_decoration_bitset instead.")
151 
152  // Returns whether the decoration has been applied to the ID.
153  bool has_decoration(uint32_t id, spv::Decoration decoration) const;
154 
155  // Gets the value for decorations which take arguments.
156  // If the decoration is a boolean (i.e. spv::DecorationNonWritable),
157  // 1 will be returned.
158  // If decoration doesn't exist or decoration is not recognized,
159  // 0 will be returned.
161  const std::string &get_decoration_string(uint32_t id, spv::Decoration decoration) const;
162 
163  // Removes the decoration for a an ID.
164  void unset_decoration(uint32_t id, spv::Decoration decoration);
165 
166  // Gets the SPIR-V type associated with ID.
167  // Mostly used with Resource::type_id and Resource::base_type_id to parse the underlying type of a resource.
169 
170  // Gets the SPIR-V type of a variable.
172 
173  // Gets the id of SPIR-V type underlying the given type_id, which might be a pointer.
175 
176  // Gets the SPIR-V type underlying the given type, which might be a pointer.
178 
179  // Gets the SPIR-V type underlying the given type_id, which might be a pointer.
181 
182  // Gets the underlying storage class for an OpVariable.
184 
185  // If get_name() is an empty string, get the fallback name which will be used
186  // instead in the disassembled source.
187  virtual const std::string get_fallback_name(uint32_t id) const;
188 
189  // If get_name() of a Block struct is an empty string, get the fallback name.
190  // This needs to be per-variable as multiple variables can use the same block type.
191  virtual const std::string get_block_fallback_name(uint32_t id) const;
192 
193  // Given an OpTypeStruct in ID, obtain the identifier for member number "index".
194  // This may be an empty string.
196 
197  // Given an OpTypeStruct in ID, obtain the OpMemberDecoration for member number "index".
200 
201  // Sets the member identifier for OpTypeStruct ID, member number "index".
202  void set_member_name(uint32_t id, uint32_t index, const std::string &name);
203 
204  // Returns the qualified member identifier for OpTypeStruct ID, member number "index",
205  // or an empty string if no qualified alias exists
207 
208  // Sets the qualified member identifier for OpTypeStruct ID, member number "index".
209  void set_member_qualified_name(uint32_t type_id, uint32_t index, const std::string &name);
210 
211  // Gets the decoration mask for a member of a struct, similar to get_decoration_mask.
215 
216  // Returns whether the decoration has been applied to a member of a struct.
218 
219  // Similar to set_decoration, but for struct members.
222  const std::string &argument);
223 
224  // Unsets a member decoration, similar to unset_decoration.
226 
227  // Gets the fallback name for a member, similar to get_fallback_name.
229  {
230  return join("_", index);
231  }
232 
233  // Returns a vector of which members of a struct are potentially in use by a
234  // SPIR-V shader. The granularity of this analysis is per-member of a struct.
235  // This can be used for Buffer (UBO), BufferBlock/StorageBuffer (SSBO) and PushConstant blocks.
236  // ID is the Resource::id obtained from get_shader_resources().
237  std::vector<BufferRange> get_active_buffer_ranges(uint32_t id) const;
238 
239  // Returns the effective size of a buffer block.
240  size_t get_declared_struct_size(const SPIRType &struct_type) const;
241 
242  // Returns the effective size of a buffer block struct member.
243  virtual size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const;
244 
245  // Legacy GLSL compatibility method. Deprecated in favor of CompilerGLSL::flatten_buffer_block
246  SPIRV_CROSS_DEPRECATED("Please use flatten_buffer_block instead.") void flatten_interface_block(uint32_t id);
247 
248  // Returns a set of all global variables which are statically accessed
249  // by the control flow graph from the current entry point.
250  // Only variables which change the interface for a shader are returned, that is,
251  // variables with storage class of Input, Output, Uniform, UniformConstant, PushConstant and AtomicCounter
252  // storage classes are returned.
253  //
254  // To use the returned set as the filter for which variables are used during compilation,
255  // this set can be moved to set_enabled_interface_variables().
257 
258  // Sets the interface variables which are used during compilation.
259  // By default, all variables are used.
260  // Once set, compile() will only consider the set in active_variables.
261  void set_enabled_interface_variables(std::unordered_set<uint32_t> active_variables);
262 
263  // Query shader resources, use ids with reflection interface to modify or query binding points, etc.
265 
266  // Query shader resources, but only return the variables which are part of active_variables.
267  // E.g.: get_shader_resources(get_active_variables()) to only return the variables which are statically
268  // accessed.
269  ShaderResources get_shader_resources(const std::unordered_set<uint32_t> &active_variables) const;
270 
271  // Remapped variables are considered built-in variables and a backend will
272  // not emit a declaration for this variable.
273  // This is mostly useful for making use of builtins which are dependent on extensions.
274  void set_remapped_variable_state(uint32_t id, bool remap_enable);
276 
277  // For subpassInput variables which are remapped to plain variables,
278  // the number of components in the remapped
279  // variable must be specified as the backing type of subpass inputs are opaque.
282 
283  // All operations work on the current entry point.
284  // Entry points can be swapped out with set_entry_point().
285  // Entry points should be set right after the constructor completes as some reflection functions traverse the graph from the entry point.
286  // Resource reflection also depends on the entry point.
287  // By default, the current entry point is set to the first OpEntryPoint which appears in the SPIR-V module.
289  std::vector<std::string> get_entry_points() const;
290  SPIRV_CROSS_DEPRECATED("Please use set_entry_point(const std::string &, spv::ExecutionModel) instead.")
291  void set_entry_point(const std::string &name);
292 
293  // Renames an entry point from old_name to new_name.
294  // If old_name is currently selected as the current entry point, it will continue to be the current entry point,
295  // albeit with a new name.
296  // get_entry_points() is essentially invalidated at this point.
298  "Please use rename_entry_point(const std::string&, const std::string&, spv::ExecutionModel) instead.")
299  void rename_entry_point(const std::string &old_name, const std::string &new_name);
300 
301  // Returns the internal data structure for entry points to allow poking around.
302  SPIRV_CROSS_DEPRECATED("Please use get_entry_point(const std::string &, spv::ExecutionModel instead.")
304  SPIRV_CROSS_DEPRECATED("Please use get_entry_point(const std::string &, spv::ExecutionModel instead.")
306 
307  // Some shader languages restrict the names that can be given to entry points, and the
308  // corresponding backend will automatically rename an entry point name, during the call
309  // to compile() if it is illegal. For example, the common entry point name main() is
310  // illegal in MSL, and is renamed to an alternate name by the MSL backend.
311  // Given the original entry point name contained in the SPIR-V, this function returns
312  // the name, as updated by the backend during the call to compile(). If the name is not
313  // illegal, and has not been renamed, or if this function is called before compile(),
314  // this function will simply return the same name.
316  "Please use get_cleansed_entry_point_name(const std::string &, spv::ExecutionModel) instead.")
318 
319  // New variants of entry point query and reflection.
320  // Names for entry points in the SPIR-V module may alias if they belong to different execution models.
321  // To disambiguate, we must pass along with the entry point names the execution model.
323  void set_entry_point(const std::string &entry, spv::ExecutionModel execution_model);
324  void rename_entry_point(const std::string &old_name, const std::string &new_name,
325  spv::ExecutionModel execution_model);
327  SPIREntryPoint &get_entry_point(const std::string &name, spv::ExecutionModel execution_model);
329  spv::ExecutionModel execution_model) const;
330 
331  // Query and modify OpExecutionMode.
335 
338 
339  // Gets argument for an execution mode (LocalSize, Invocations, OutputVertices).
340  // For LocalSize, the index argument is used to select the dimension (X = 0, Y = 1, Z = 2).
341  // For execution modes which do not have arguments, 0 is returned.
344 
345  // In SPIR-V, the compute work group size can be represented by a constant vector, in which case
346  // the LocalSize execution mode is ignored.
347  //
348  // This constant vector can be a constant vector, specialization constant vector, or partly specialized constant vector.
349  // To modify and query work group dimensions which are specialization constants, SPIRConstant values must be modified
350  // directly via get_constant() rather than using LocalSize directly. This function will return which constants should be modified.
351  //
352  // To modify dimensions which are *not* specialization constants, set_execution_mode should be used directly.
353  // Arguments to set_execution_mode which are specialization constants are effectively ignored during compilation.
354  // NOTE: This is somewhat different from how SPIR-V works. In SPIR-V, the constant vector will completely replace LocalSize,
355  // while in this interface, LocalSize is only ignored for specialization constants.
356  //
357  // The specialization constant will be written to x, y and z arguments.
358  // If the component is not a specialization constant, a zeroed out struct will be written.
359  // The return value is the constant ID of the builtin WorkGroupSize, but this is not expected to be useful
360  // for most use cases.
363 
364  // Analyzes all OpImageFetch (texelFetch) opcodes and checks if there are instances where
365  // said instruction is used without a combined image sampler.
366  // GLSL targets do not support the use of texelFetch without a sampler.
367  // To workaround this, we must inject a dummy sampler which can be used to form a sampler2D at the call-site of
368  // texelFetch as necessary.
369  //
370  // This must be called before build_combined_image_samplers().
371  // build_combined_image_samplers() may refer to the ID returned by this method if the returned ID is non-zero.
372  // The return value will be the ID of a sampler object if a dummy sampler is necessary, or 0 if no sampler object
373  // is required.
374  //
375  // If the returned ID is non-zero, it can be decorated with set/bindings as desired before calling compile().
376  // Calling this function also invalidates get_active_interface_variables(), so this should be called
377  // before that function.
379 
380  // Analyzes all separate image and samplers used from the currently selected entry point,
381  // and re-routes them all to a combined image sampler instead.
382  // This is required to "support" separate image samplers in targets which do not natively support
383  // this feature, like GLSL/ESSL.
384  //
385  // This must be called before compile() if such remapping is desired.
386  // This call will add new sampled images to the SPIR-V,
387  // so it will appear in reflection if get_shader_resources() is called after build_combined_image_samplers.
388  //
389  // If any image/sampler remapping was found, no separate image/samplers will appear in the decompiled output,
390  // but will still appear in reflection.
391  //
392  // The resulting samplers will be void of any decorations like name, descriptor sets and binding points,
393  // so this can be added before compile() if desired.
394  //
395  // Combined image samplers originating from this set are always considered active variables.
396  // Arrays of separate samplers are not supported, but arrays of separate images are supported.
397  // Array of images + sampler -> Array of combined image samplers.
399 
400  // Gets a remapping for the combined image samplers.
402  {
404  }
405 
406  // Set a new variable type remap callback.
407  // The type remapping is designed to allow global interface variable to assume more special types.
408  // A typical example here is to remap sampler2D into samplerExternalOES, which currently isn't supported
409  // directly by SPIR-V.
410  //
411  // In compile() while emitting code,
412  // for every variable that is declared, including function parameters, the callback will be called
413  // and the API user has a chance to change the textual representation of the type used to declare the variable.
414  // The API user can detect special patterns in names to guide the remapping.
416  {
417  variable_remap_callback = std::move(cb);
418  }
419 
420  // API for querying which specialization constants exist.
421  // To modify a specialization constant before compile(), use get_constant(constant.id),
422  // then update constants directly in the SPIRConstant data structure.
423  // For composite types, the subconstants can be iterated over and modified.
424  // constant_type is the SPIRType for the specialization constant,
425  // which can be queried to determine which fields in the unions should be poked at.
426  std::vector<SpecializationConstant> get_specialization_constants() const;
428  const SPIRConstant &get_constant(uint32_t id) const;
429 
431  {
432  return uint32_t(ids.size());
433  }
434 
435  // API for querying buffer objects.
436  // The type passed in here should be the base type of a resource, i.e.
437  // get_type(resource.base_type_id)
438  // as decorations are set in the basic Block type.
439  // The type passed in here must have these decorations set, or an exception is raised.
440  // Only UBOs and SSBOs or sub-structs which are part of these buffer types will have these decorations set.
444 
445  // Gets the offset in SPIR-V words (uint32_t) for a decoration which was originally declared in the SPIR-V binary.
446  // The offset will point to one or more uint32_t literals which can be modified in-place before using the SPIR-V binary.
447  // Note that adding or removing decorations using the reflection API will not change the behavior of this function.
448  // If the decoration was declared, sets the word_offset to an offset into the provided SPIR-V binary buffer and returns true,
449  // otherwise, returns false.
450  // If the decoration does not have any value attached to it (e.g. DecorationRelaxedPrecision), this function will also return false.
451  bool get_binary_offset_for_decoration(uint32_t id, spv::Decoration decoration, uint32_t &word_offset) const;
452 
453  // HLSL counter buffer reflection interface.
454  // Append/Consume/Increment/Decrement in HLSL is implemented as two "neighbor" buffer objects where
455  // one buffer implements the storage, and a single buffer containing just a lone "int" implements the counter.
456  // To SPIR-V these will be exposed as two separate buffers, but glslang HLSL frontend emits a special indentifier
457  // which lets us link the two buffers together.
458 
459  // Queries if a variable ID is a counter buffer which "belongs" to a regular buffer object.
460 
461  // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module.
462  // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will
463  // only return true if OpSource was reported HLSL.
464  // To rely on this functionality, ensure that the SPIR-V module is not stripped.
465 
467 
468  // Queries if a buffer object has a neighbor "counter" buffer.
469  // If so, the ID of that counter buffer will be returned in counter_id.
470  // If SPV_GOOGLE_hlsl_functionality1 is used, this can be used even with a stripped SPIR-V module.
471  // Otherwise, this query is purely based on OpName identifiers as found in the SPIR-V module, and will
472  // only return true if OpSource was reported HLSL.
473  // To rely on this functionality, ensure that the SPIR-V module is not stripped.
474  bool buffer_get_hlsl_counter_buffer(uint32_t id, uint32_t &counter_id) const;
475 
476  // Gets the list of all SPIR-V Capabilities which were declared in the SPIR-V module.
477  const std::vector<spv::Capability> &get_declared_capabilities() const;
478 
479  // Gets the list of all SPIR-V extensions which were declared in the SPIR-V module.
480  const std::vector<std::string> &get_declared_extensions() const;
481 
482  // When declaring buffer blocks in GLSL, the name declared in the GLSL source
483  // might not be the same as the name declared in the SPIR-V module due to naming conflicts.
484  // In this case, SPIRV-Cross needs to find a fallback-name, and it might only
485  // be possible to know this name after compiling to GLSL.
486  // This is particularly important for HLSL input and UAVs which tends to reuse the same block type
487  // for multiple distinct blocks. For these cases it is not possible to modify the name of the type itself
488  // because it might be unique. Instead, you can use this interface to check after compilation which
489  // name was actually used if your input SPIR-V tends to have this problem.
490  // For other names like remapped names for variables, etc, it's generally enough to query the name of the variables
491  // after compiling, block names are an exception to this rule.
492  // ID is the name of a variable as returned by Resource::id, and must be a variable with a Block-like type.
494 
495  // For buffer block variables, get the decorations for that variable.
496  // Sometimes, decorations for buffer blocks are found in member decorations instead
497  // of direct decorations on the variable itself.
498  // The most common use here is to check if a buffer is readonly or writeonly.
500 
501 protected:
502  const uint32_t *stream(const Instruction &instr) const
503  {
504  // If we're not going to use any arguments, just return nullptr.
505  // We want to avoid case where we return an out of range pointer
506  // that trips debug assertions on some platforms.
507  if (!instr.length)
508  return nullptr;
509 
510  if (instr.offset + instr.length > spirv.size())
511  SPIRV_CROSS_THROW("Compiler::stream() out of range.");
512  return &spirv[instr.offset];
513  }
514  std::vector<uint32_t> spirv;
515 
516  std::vector<Instruction> inst;
517  std::vector<Variant> ids;
518  std::vector<Meta> meta;
519 
522  std::vector<uint32_t> global_variables;
523  std::vector<uint32_t> aliased_variables;
524  std::unordered_set<uint32_t> active_interface_variables;
526 
527  // If our IDs are out of range here as part of opcodes, throw instead of
528  // undefined behavior.
529  template <typename T, typename... P>
530  T &set(uint32_t id, P &&... args)
531  {
532  auto &var = variant_set<T>(ids.at(id), std::forward<P>(args)...);
533  var.self = id;
534  return var;
535  }
536 
537  template <typename T>
539  {
540  return variant_get<T>(ids.at(id));
541  }
542 
543  template <typename T>
545  {
546  if (ids.at(id).get_type() == T::type)
547  return &get<T>(id);
548  else
549  return nullptr;
550  }
551 
552  template <typename T>
553  const T &get(uint32_t id) const
554  {
555  return variant_get<T>(ids.at(id));
556  }
557 
558  template <typename T>
559  const T *maybe_get(uint32_t id) const
560  {
561  if (ids.at(id).get_type() == T::type)
562  return &get<T>(id);
563  else
564  return nullptr;
565  }
566 
568  // Normally, we'd stick SPIREntryPoint in ids array, but it conflicts with SPIRFunction.
569  // Entry points can therefore be seen as some sort of meta structure.
570  std::unordered_map<uint32_t, SPIREntryPoint> entry_points;
571  const SPIREntryPoint &get_entry_point() const;
573 
574  struct Source
575  {
577  bool es = false;
578  bool known = false;
579  bool hlsl = false;
580 
581  Source() = default;
582  } source;
583 
584  std::unordered_set<uint32_t> loop_blocks;
585  std::unordered_set<uint32_t> continue_blocks;
586  std::unordered_set<uint32_t> loop_merge_targets;
587  std::unordered_set<uint32_t> selection_merge_targets;
588  std::unordered_set<uint32_t> multiselect_merge_targets;
589  std::unordered_map<uint32_t, uint32_t> continue_block_to_loop_header;
590 
591  virtual std::string to_name(uint32_t id, bool allow_alias = true) const;
592  bool is_builtin_variable(const SPIRVariable &var) const;
593  bool is_hidden_variable(const SPIRVariable &var, bool include_builtins = false) const;
594  bool is_immutable(uint32_t id) const;
596  bool is_scalar(const SPIRType &type) const;
597  bool is_vector(const SPIRType &type) const;
598  bool is_matrix(const SPIRType &type) const;
599  bool is_array(const SPIRType &type) const;
601  const SPIRType &expression_type(uint32_t id) const;
602  bool expression_is_lvalue(uint32_t id) const;
603  bool variable_storage_is_aliased(const SPIRVariable &var);
606 
607  void register_read(uint32_t expr, uint32_t chain, bool forwarded);
608  void register_write(uint32_t chain);
609 
610  inline bool is_continue(uint32_t next) const
611  {
612  return continue_blocks.find(next) != end(continue_blocks);
613  }
614 
615  inline bool is_single_block_loop(uint32_t next) const
616  {
617  auto &block = get<SPIRBlock>(next);
618  return block.merge == SPIRBlock::MergeLoop && block.continue_block == next;
619  }
620 
621  inline bool is_break(uint32_t next) const
622  {
623  return loop_merge_targets.find(next) != end(loop_merge_targets) ||
625  }
626 
627  inline bool is_loop_break(uint32_t next) const
628  {
630  }
631 
632  inline bool is_conditional(uint32_t next) const
633  {
636  }
637 
638  // Dependency tracking for temporaries read from variables.
639  void flush_dependees(SPIRVariable &var);
646  std::unordered_set<uint32_t> invalid_expressions;
647 
648  void update_name_cache(std::unordered_set<std::string> &cache, std::string &name);
649 
650  bool function_is_pure(const SPIRFunction &func);
651  bool block_is_pure(const SPIRBlock &block);
653 
654  bool execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const;
655  bool execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const;
656  SPIRBlock::ContinueBlockType continue_block_type(const SPIRBlock &continue_block) const;
657 
658  bool force_recompile = false;
659 
660  bool block_is_loop_candidate(const SPIRBlock &block, SPIRBlock::Method method) const;
661 
662  uint32_t increase_bound_by(uint32_t incr_amount);
663 
664  bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const;
666 
667  // For proper multiple entry point support, allow querying if an Input or Output
668  // variable is part of that entry points interface.
670 
671  std::vector<CombinedImageSampler> combined_image_samplers;
672 
673  void remap_variable_type_name(const SPIRType &type, const std::string &var_name, std::string &type_name) const
674  {
676  variable_remap_callback(type, var_name, type_name);
677  }
678 
679  void parse();
680  void parse(const Instruction &i);
681 
682  // Used internally to implement various traversals for queries.
684  {
685  virtual ~OpcodeHandler() = default;
686 
687  // Return true if traversal should continue.
688  // If false, traversal will end immediately.
689  virtual bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) = 0;
690 
691  virtual bool follow_function_call(const SPIRFunction &)
692  {
693  return true;
694  }
695 
696  virtual void set_current_block(const SPIRBlock &)
697  {
698  }
699 
700  virtual bool begin_function_scope(const uint32_t *, uint32_t)
701  {
702  return true;
703  }
704 
705  virtual bool end_function_scope(const uint32_t *, uint32_t)
706  {
707  return true;
708  }
709  };
710 
712  {
713  BufferAccessHandler(const Compiler &compiler_, std::vector<BufferRange> &ranges_, uint32_t id_)
714  : compiler(compiler_)
715  , ranges(ranges_)
716  , id(id_)
717  {
718  }
719 
720  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
721 
723  std::vector<BufferRange> &ranges;
725 
726  std::unordered_set<uint32_t> seen;
727  };
728 
730  {
731  InterfaceVariableAccessHandler(const Compiler &compiler_, std::unordered_set<uint32_t> &variables_)
732  : compiler(compiler_)
733  , variables(variables_)
734  {
735  }
736 
737  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
738 
740  std::unordered_set<uint32_t> &variables;
741  };
742 
744  {
746  : compiler(compiler_)
747  {
748  }
749  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
750  bool begin_function_scope(const uint32_t *args, uint32_t length) override;
751  bool end_function_scope(const uint32_t *args, uint32_t length) override;
752 
754 
755  // Each function in the call stack needs its own remapping for parameters so we can deduce which global variable each texture/sampler the parameter is statically bound to.
756  std::stack<std::unordered_map<uint32_t, uint32_t>> parameter_remapping;
757  std::stack<SPIRFunction *> functions;
758 
761  void pop_remap_parameters();
762  void register_combined_image_sampler(SPIRFunction &caller, uint32_t texture_id, uint32_t sampler_id,
763  bool depth);
764  };
765 
767  {
769  : compiler(compiler_)
770  {
771  }
772  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
773 
775  bool need_dummy_sampler = false;
776  };
777 
779  {
781  : compiler(compiler_)
782  {
783  }
784 
785  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
787 
788  void handle_builtin(const SPIRType &type, spv::BuiltIn builtin, const Bitset &decoration_flags);
789  };
790 
793  // This must be an ordered data structure so we always pick the same type aliases.
794  std::vector<uint32_t> global_struct_cache;
795 
796  ShaderResources get_shader_resources(const std::unordered_set<uint32_t> *active_variables) const;
797 
799 
800  Bitset get_buffer_block_flags(const SPIRVariable &var) const;
801  bool get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type);
802 
803  std::unordered_set<uint32_t> forced_temporaries;
804  std::unordered_set<uint32_t> forwarded_temporaries;
805  std::unordered_set<uint32_t> hoisted_temporaries;
806 
811  bool position_invariant = false;
812 
813  // Traverses all reachable opcodes and sets active_builtins to a bitmask of all builtin variables which are accessed in the shader.
814  void update_active_builtins();
816 
818  SPIRFunction &entry, const CFG &cfg,
819  const std::unordered_map<uint32_t, std::unordered_set<uint32_t>> &variable_to_blocks,
820  const std::unordered_map<uint32_t, std::unordered_set<uint32_t>> &complete_write_blocks);
821 
822  // If a variable ID or parameter ID is found in this set, a sampler is actually a shadow/comparison sampler.
823  // SPIR-V does not support this distinction, so we must keep track of this information outside the type system.
824  // There might be unrelated IDs found in this set which do not correspond to actual variables.
825  // This set should only be queried for the existence of samplers which are already known to be variables or parameter IDs.
826  // Similar is implemented for images, as well as if subpass inputs are needed.
827  std::unordered_set<uint32_t> comparison_ids;
828  bool need_subpass_input = false;
829 
830  // In certain backends, we will need to use a dummy sampler to be able to emit code.
831  // GLSL does not support texelFetch on texture2D objects, but SPIR-V does,
832  // so we need to workaround by having the application inject a dummy sampler.
834 
836 
838  {
840  : compiler(compiler_)
841  {
842  }
843  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
844 
846  std::unordered_set<uint32_t> dref_combined_samplers;
847  };
848 
850  {
852  const std::unordered_set<uint32_t> &dref_combined_samplers_)
853  : compiler(compiler_)
854  , dref_combined_samplers(dref_combined_samplers_)
855  {
856  }
857 
858  bool begin_function_scope(const uint32_t *args, uint32_t length) override;
859  bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override;
861  const std::unordered_set<uint32_t> &dref_combined_samplers;
862 
863  std::unordered_map<uint32_t, std::unordered_set<uint32_t>> dependency_hierarchy;
864  std::unordered_set<uint32_t> comparison_ids;
865 
867  bool need_subpass_input = false;
868  };
869 
871  std::unordered_map<uint32_t, std::unique_ptr<CFG>> function_cfgs;
873  {
874  CFGBuilder(Compiler &compiler_);
875 
876  bool follow_function_call(const SPIRFunction &func) override;
877  bool handle(spv::Op op, const uint32_t *args, uint32_t length) override;
879  std::unordered_map<uint32_t, std::unique_ptr<CFG>> function_cfgs;
880  };
881 
883  {
885 
886  bool follow_function_call(const SPIRFunction &) override;
887  void set_current_block(const SPIRBlock &block) override;
888 
890  bool id_is_phi_variable(uint32_t id) const;
891  bool id_is_potential_temporary(uint32_t id) const;
892  bool handle(spv::Op op, const uint32_t *args, uint32_t length) override;
893 
896  std::unordered_map<uint32_t, std::unordered_set<uint32_t>> accessed_variables_to_block;
897  std::unordered_map<uint32_t, std::unordered_set<uint32_t>> accessed_temporaries_to_block;
898  std::unordered_map<uint32_t, uint32_t> result_id_to_type;
899  std::unordered_map<uint32_t, std::unordered_set<uint32_t>> complete_write_variables_to_block;
900  std::unordered_map<uint32_t, std::unordered_set<uint32_t>> partial_write_variables_to_block;
901  const SPIRBlock *current_block = nullptr;
902  };
903 
905  {
906  StaticExpressionAccessHandler(Compiler &compiler_, uint32_t variable_id_);
907  bool follow_function_call(const SPIRFunction &) override;
908  bool handle(spv::Op op, const uint32_t *args, uint32_t length) override;
909 
914  };
915 
918 
920 
921  std::vector<spv::Capability> declared_capabilities;
922  std::vector<std::string> declared_extensions;
923  std::unordered_map<uint32_t, std::string> declared_block_names;
924 
925  bool instruction_to_result_type(uint32_t &result_type, uint32_t &result_id, spv::Op op, const uint32_t *args,
926  uint32_t length);
927 
930 
931  bool image_is_comparison(const SPIRType &type, uint32_t id) const;
932 
933 private:
934  // Used only to implement the old deprecated get_entry_point() interface.
937 
938  void fixup_type_alias();
939  bool type_is_block_like(const SPIRType &type) const;
940 };
941 } // namespace spirv_cross
942 
943 #endif
bool block_is_pure(const SPIRBlock &block)
Definition: spirv_cross.cpp:117
void handle_builtin(const SPIRType &type, spv::BuiltIn builtin, const Bitset &decoration_flags)
Definition: spirv_cross.cpp:4337
void register_write(uint32_t chain)
Definition: spirv_cross.cpp:307
bool interface_variable_exists_in_entry_point(uint32_t id) const
Definition: spirv_cross.cpp:3022
std::vector< Instruction > inst
Definition: spirv_cross.hpp:516
BufferAccessHandler(const Compiler &compiler_, std::vector< BufferRange > &ranges_, uint32_t id_)
Definition: spirv_cross.hpp:713
Definition: spirv_cross.hpp:94
const T * maybe_get(uint32_t id) const
Definition: spirv_cross.hpp:559
uint32_t id
Definition: spirv_cross.hpp:89
bool is_vector(const SPIRType &type) const
Definition: spirv_cross.cpp:521
GLuint const GLchar * name
Definition: glext.h:6671
GLuint * ids
Definition: glext.h:6547
Definition: spirv_cross.hpp:55
std::unordered_map< uint32_t, uint32_t > continue_block_to_loop_header
Definition: spirv_cross.hpp:589
const std::unordered_set< uint32_t > & dref_combined_samplers
Definition: spirv_cross.hpp:861
virtual const std::string get_fallback_name(uint32_t id) const
Definition: spirv_cross.cpp:1370
std::unordered_map< uint32_t, std::string > declared_block_names
Definition: spirv_cross.hpp:923
bool handle(spv::Op op, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3737
virtual bool follow_function_call(const SPIRFunction &)
Definition: spirv_cross.hpp:691
std::unordered_set< uint32_t > get_active_interface_variables() const
Definition: spirv_cross.cpp:662
BufferPackingStandard
Definition: spirv_cross.hpp:101
Definition: spirv_common.hpp:283
GLenum GLenum GLuint components
Definition: glext.h:10527
#define const
Definition: zconf.h:217
bool is_scalar(const SPIRType &type) const
Definition: spirv_cross.cpp:516
std::vector< Resource > storage_buffers
Definition: spirv_cross.hpp:58
std::unordered_set< uint32_t > dref_combined_samplers
Definition: spirv_cross.hpp:846
SPIRBlock * current_block
Definition: spirv_cross.hpp:521
bool instruction_to_result_type(uint32_t &result_type, uint32_t &result_id, spv::Op op, const uint32_t *args, uint32_t length)
Definition: spirv_cross.cpp:4813
GLenum mode
Definition: glext.h:6857
set set set set set set set macro pixldst1 op
Definition: pixman-arm-neon-asm.h:54
bool is_hidden_variable(const SPIRVariable &var, bool include_builtins=false) const
Definition: spirv_cross.cpp:471
bool is_builtin_variable(const SPIRVariable &var) const
Definition: spirv_cross.cpp:490
bool follow_function_call(const SPIRFunction &) override
Definition: spirv_cross.cpp:3657
std::vector< BufferRange > get_active_buffer_ranges(uint32_t id) const
Definition: spirv_cross.cpp:2677
std::string join(Ts &&... ts)
Definition: spirv_common.hpp:218
#define SPIRV_CROSS_THROW(x)
Definition: spirv_common.hpp:68
uint32_t static_expression
Definition: spirv_cross.hpp:912
std::unordered_set< uint32_t > forced_temporaries
Definition: spirv_cross.hpp:803
std::unordered_map< uint32_t, std::unordered_set< uint32_t > > partial_write_variables_to_block
Definition: spirv_cross.hpp:900
bool execution_is_noop(const SPIRBlock &from, const SPIRBlock &to) const
Definition: spirv_cross.cpp:2426
Definition: disassemble.cpp:50
const std::vector< CombinedImageSampler > & get_combined_image_samplers() const
Definition: spirv_cross.hpp:401
uint32_t type_struct_member_matrix_stride(const SPIRType &type, uint32_t index) const
Definition: spirv_cross.cpp:2551
Definition: spirv_cross.hpp:711
CombinedImageSamplerDrefHandler(Compiler &compiler_)
Definition: spirv_cross.hpp:839
uint32_t clip_distance_count
Definition: spirv_cross.hpp:809
bool need_subpass_input
Definition: spirv_cross.hpp:828
void set_member_decoration(uint32_t id, uint32_t index, spv::Decoration decoration, uint32_t argument=0)
Definition: spirv_cross.cpp:1112
Bitset combined_decoration_for_member(const SPIRType &type, uint32_t index) const
Definition: spirv_cross.cpp:4853
virtual ~Compiler()=default
void flush_dependees(SPIRVariable &var)
Definition: spirv_cross.cpp:340
Definition: spirv_cross.hpp:117
bool position_invariant
Definition: spirv_cross.hpp:811
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3211
#define T(x)
SPIRV_CROSS_DEPRECATED("Please use flatten_buffer_block instead.") void flatten_interface_block(uint32_t id)
Definition: spirv_common.hpp:470
void parse()
Definition: spirv_cross.cpp:889
StorageClass
Definition: spirv.hpp:137
std::unordered_set< uint32_t > loop_blocks
Definition: spirv_cross.hpp:584
bool need_dummy_sampler
Definition: spirv_cross.hpp:775
Definition: spirv_cross.hpp:86
Bitset active_output_builtins
Definition: spirv_cross.hpp:808
uint32_t combined_id
Definition: spirv_cross.hpp:79
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection from
Definition: msg_hash_ar.h:34
bool es
Definition: spirv_cross.hpp:577
Definition: spirv_common.hpp:369
bool expression_is_lvalue(uint32_t id) const
Definition: spirv_cross.cpp:417
void find_function_local_luts(SPIRFunction &function, const AnalyzeVariableScopeAccessHandler &handler)
Definition: spirv_cross.cpp:3968
void flush_all_aliased_variables()
Definition: spirv_cross.cpp:347
virtual bool begin_function_scope(const uint32_t *, uint32_t)
Definition: spirv_cross.hpp:700
Definition: spirv_cross.hpp:26
void set_decoration_string(uint32_t id, spv::Decoration decoration, const std::string &argument)
Definition: spirv_cross.cpp:1286
std::vector< Meta > meta
Definition: spirv_cross.hpp:518
Compiler & compiler
Definition: spirv_cross.hpp:845
std::unordered_set< uint32_t > selection_merge_targets
Definition: spirv_cross.hpp:587
SPIRConstant & get_constant(uint32_t id)
Definition: spirv_cross.cpp:3540
std::unordered_set< uint32_t > & variables
Definition: spirv_cross.hpp:740
const Bitset & get_decoration_bitset(uint32_t id) const
Definition: spirv_cross.cpp:1389
std::vector< Resource > stage_outputs
Definition: spirv_cross.hpp:60
void build_function_control_flow_graphs_and_analyze()
Definition: spirv_cross.cpp:4555
uint64_t get_member_decoration_mask(uint32_t id, uint32_t index) const
Definition: spirv_cross.cpp:1228
#define P(a, b, c, d, k, s, t)
size_t get_declared_struct_size(const SPIRType &struct_type) const
Definition: spirv_cross.cpp:2562
void register_combined_image_sampler(SPIRFunction &caller, uint32_t texture_id, uint32_t sampler_id, bool depth)
Definition: spirv_cross.cpp:3134
const Bitset & get_member_decoration_bitset(uint32_t id, uint32_t index) const
Definition: spirv_cross.cpp:1233
void inherit_expression_dependencies(uint32_t dst, uint32_t source)
Definition: spirv_cross.cpp:2863
void set_entry_point(const std::string &name)
Definition: spirv_cross.cpp:2928
virtual std::string to_name(uint32_t id, bool allow_alias=true) const
Definition: spirv_cross.cpp:187
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:2633
GLenum GLuint id
Definition: glext.h:6233
bool types_are_logically_equivalent(const SPIRType &a, const SPIRType &b) const
Definition: spirv_cross.cpp:2696
const Compiler & compiler
Definition: spirv_cross.hpp:722
DummySamplerForCombinedImageHandler(Compiler &compiler_)
Definition: spirv_cross.hpp:768
uint32_t offset
Definition: spirv_common.hpp:289
void flush_all_atomic_capable_variables()
Definition: spirv_cross.cpp:353
std::unordered_set< uint32_t > seen
Definition: spirv_cross.hpp:726
uint32_t write_count
Definition: spirv_cross.hpp:913
std::vector< std::string > get_entry_points() const
Definition: spirv_cross.cpp:2898
uint32_t id
Definition: spirv_cross.hpp:724
bool id_is_potential_temporary(uint32_t id) const
Definition: spirv_cross.cpp:3728
#define next(ls)
Definition: llex.c:32
Definition: spirv_cross.hpp:683
GLdouble GLdouble z
Definition: glext.h:6514
T & get(uint32_t id)
Definition: spirv_cross.hpp:538
GLsizei const GLchar *const * string
Definition: glext.h:6699
Compiler & compiler
Definition: spirv_cross.hpp:894
void unset_member_decoration(uint32_t id, uint32_t index, spv::Decoration decoration)
Definition: spirv_cross.cpp:1250
const std::string & get_name(uint32_t id) const
Definition: spirv_cross.cpp:1365
bool check_active_interface_variables
Definition: spirv_cross.hpp:525
Definition: spirv_cross.hpp:111
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
Bitset active_input_builtins
Definition: spirv_cross.hpp:807
Definition: spirv_cross.hpp:103
std::vector< spv::Capability > declared_capabilities
Definition: spirv_cross.hpp:921
uint32_t get_current_id_bound() const
Definition: spirv_cross.hpp:430
uint32_t image_id
Definition: spirv_cross.hpp:81
ExecutionMode
Definition: spirv.hpp:93
std::vector< Resource > sampled_images
Definition: spirv_cross.hpp:63
Compiler & compiler
Definition: spirv_cross.hpp:878
uint32_t dummy_sampler_id
Definition: spirv_cross.hpp:833
const uint32_t * stream(const Instruction &instr) const
Definition: spirv_cross.hpp:502
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:10421
uint32_t base_type_id
Definition: spirv_cross.hpp:41
bool known
Definition: spirv_cross.hpp:578
std::unordered_set< uint32_t > forwarded_temporaries
Definition: spirv_cross.hpp:804
GLboolean GLboolean GLboolean b
Definition: glext.h:6844
uint32_t increase_bound_by(uint32_t incr_amount)
Definition: spirv_cross.cpp:2687
std::unordered_map< uint32_t, std::unordered_set< uint32_t > > complete_write_variables_to_block
Definition: spirv_cross.hpp:899
void set_member_decoration_string(uint32_t id, uint32_t index, spv::Decoration decoration, const std::string &argument)
Definition: spirv_cross.cpp:1094
uint32_t version
Definition: spirv_cross.hpp:576
bool get_common_basic_type(const SPIRType &type, SPIRType::BaseType &base_type)
Definition: spirv_cross.cpp:4312
Decoration
Definition: spirv.hpp:344
void flush_all_active_variables()
Definition: spirv_cross.cpp:368
bool need_subpass_input
Definition: spirv_cross.hpp:867
Compiler & compiler
Definition: spirv_cross.hpp:860
Compiler & compiler
Definition: spirv_cross.hpp:774
Compiler & compiler
Definition: spirv_cross.hpp:910
void analyze_parameter_preservation(SPIRFunction &entry, const CFG &cfg, const std::unordered_map< uint32_t, std::unordered_set< uint32_t >> &variable_to_blocks, const std::unordered_map< uint32_t, std::unordered_set< uint32_t >> &complete_write_blocks)
bool end_function_scope(const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3087
void register_global_read_dependencies(const SPIRBlock &func, uint32_t id)
Definition: spirv_cross.cpp:226
void set_member_name(uint32_t id, uint32_t index, const std::string &name)
Definition: spirv_cross.cpp:1154
bool block_is_loop_candidate(const SPIRBlock &block, SPIRBlock::Method method) const
Definition: spirv_cross.cpp:2318
bool follow_function_call(const SPIRFunction &) override
Definition: spirv_cross.cpp:3927
Compiler & compiler
Definition: spirv_cross.hpp:753
virtual std::string compile()
Definition: spirv_cross.cpp:93
bool is_array(const SPIRType &type) const
Definition: spirv_cross.cpp:531
bool is_break(uint32_t next) const
Definition: spirv_cross.hpp:621
GLenum type
Definition: glext.h:6233
std::string name
Definition: spirv_cross.hpp:52
std::unordered_set< uint32_t > comparison_ids
Definition: spirv_cross.hpp:864
bool id_is_phi_variable(uint32_t id) const
Definition: spirv_cross.cpp:3720
void analyze_variable_scope(SPIRFunction &function, AnalyzeVariableScopeAccessHandler &handler)
Definition: spirv_cross.cpp:4062
bool begin_function_scope(const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3074
std::unordered_set< uint32_t > multiselect_merge_targets
Definition: spirv_cross.hpp:588
std::vector< Resource > separate_images
Definition: spirv_cross.hpp:72
void rename_entry_point(const std::string &old_name, const std::string &new_name, spv::ExecutionModel execution_model)
Definition: spirv_cross.cpp:2921
spv::ExecutionModel execution_model
Definition: spirv_cross.hpp:114
Definition: spirv_common.hpp:577
Definition: barrier.hpp:23
std::unordered_set< uint32_t > invalid_expressions
Definition: spirv_cross.hpp:646
std::unordered_set< uint32_t > continue_blocks
Definition: spirv_cross.hpp:585
Op
Definition: spirv.hpp:714
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:4647
std::function< void(const SPIRType &type, const std::string &var_name, std::string &name_of_type)> VariableTypeRemapCallback
Definition: spirv_common.hpp:1255
SPIRBlock::ContinueBlockType continue_block_type(const SPIRBlock &continue_block) const
Definition: spirv_cross.cpp:2459
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:10420
void remap_variable_type_name(const SPIRType &type, const std::string &var_name, std::string &type_name) const
Definition: spirv_cross.hpp:673
CFGBuilder(Compiler &compiler_)
Definition: spirv_cross.cpp:4600
GLenum func
Definition: glext.h:6668
std::string get_remapped_declared_block_name(uint32_t id) const
Definition: spirv_cross.cpp:4799
std::vector< SpecializationConstant > get_specialization_constants() const
Definition: spirv_cross.cpp:3525
uint32_t get_non_pointer_type_id(uint32_t type_id) const
Definition: spirv_cross.cpp:1066
std::unordered_map< uint32_t, std::unordered_set< uint32_t > > accessed_temporaries_to_block
Definition: spirv_cross.hpp:897
std::stack< std::unordered_map< uint32_t, uint32_t > > parameter_remapping
Definition: spirv_cross.hpp:756
const SPIRType & get_non_pointer_type(const SPIRType &type) const
Definition: spirv_cross.cpp:1078
void set_current_block(const SPIRBlock &block) override
Definition: spirv_cross.cpp:3663
ShaderResources get_shader_resources() const
Definition: spirv_cross.cpp:536
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:546
SPIRV_CROSS_DEPRECATED("Please use get_cleansed_entry_point_name(const std::string &, spv::ExecutionModel) instead.") const std std::vector< EntryPoint > get_entry_points_and_stages() const
Definition: spirv_cross.hpp:322
bool is_continue(uint32_t next) const
Definition: spirv_cross.hpp:610
void add_hierarchy_to_comparison_ids(uint32_t ids)
Definition: spirv_cross.cpp:4639
const std::string & get_member_name(uint32_t id, uint32_t index) const
Definition: spirv_cross.cpp:1170
uint32_t build_dummy_sampler_for_combined_images()
Definition: spirv_cross.cpp:3477
Definition: spirv_cfg.hpp:100
Definition: spirv_cross.hpp:107
uint32_t get_subpass_input_remapped_components(uint32_t id) const
Definition: spirv_cross.cpp:2858
void set_remapped_variable_state(uint32_t id, bool remap_enable)
Definition: spirv_cross.cpp:2843
std::vector< Resource > separate_samplers
Definition: spirv_cross.hpp:73
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
bool follow_function_call(const SPIRFunction &func) override
Definition: spirv_cross.cpp:4610
const std::vector< spv::Capability > & get_declared_capabilities() const
Definition: spirv_cross.cpp:4789
std::vector< uint32_t > aliased_variables
Definition: spirv_cross.hpp:523
bool type_is_block_like(const SPIRType &type) const
Definition: spirv_cross.cpp:825
std::unordered_map< uint32_t, uint32_t > result_id_to_type
Definition: spirv_cross.hpp:898
void set_decoration(uint32_t id, spv::Decoration decoration, uint32_t argument=0)
Definition: spirv_cross.cpp:1302
uint32_t get_work_group_size_specialization_constants(SpecializationConstant &x, SpecializationConstant &y, SpecializationConstant &z) const
Definition: spirv_cross.cpp:2774
const T & get(uint32_t id) const
Definition: spirv_cross.hpp:553
const SPIRType & get_type(uint32_t id) const
Definition: spirv_cross.cpp:1056
const SPIRBlock * current_block
Definition: spirv_cross.hpp:901
bool has_member_decoration(uint32_t id, uint32_t index, spv::Decoration decoration) const
Definition: spirv_cross.cpp:1245
GLint GLint GLint GLint GLint x
Definition: glext.h:6295
uint32_t type_struct_member_offset(const SPIRType &type, uint32_t index) const
Definition: spirv_cross.cpp:2530
bool traverse_all_reachable_opcodes(const SPIRBlock &block, OpcodeHandler &handler) const
Definition: spirv_cross.cpp:2488
bool is_matrix(const SPIRType &type) const
Definition: spirv_cross.cpp:526
void set_name(uint32_t id, const std::string &name)
Definition: spirv_cross.cpp:1026
Definition: spirv_cross.hpp:104
dictionary args
Definition: test_shaders.py:20
CombinedImageSamplerUsageHandler(Compiler &compiler_, const std::unordered_set< uint32_t > &dref_combined_samplers_)
Definition: spirv_cross.hpp:851
void update_name_cache(std::unordered_set< std::string > &cache, std::string &name)
GLint GLint GLsizei GLsizei GLsizei depth
Definition: glext.h:6293
void analyze_image_and_sampler_usage()
Definition: spirv_cross.cpp:4514
void unset_decoration(uint32_t id, spv::Decoration decoration)
Definition: spirv_cross.cpp:1451
void pop_remap_parameters()
Definition: spirv_cross.cpp:3052
std::unordered_map< uint32_t, std::unordered_set< uint32_t > > accessed_variables_to_block
Definition: spirv_cross.hpp:896
Compiler(std::vector< uint32_t > ir)
Definition: spirv_cross.cpp:81
T & set(uint32_t id, P &&... args)
Definition: spirv_cross.hpp:530
std::unordered_set< uint32_t > active_interface_variables
Definition: spirv_cross.hpp:524
const Compiler & compiler
Definition: spirv_cross.hpp:739
StaticExpressionAccessHandler(Compiler &compiler_, uint32_t variable_id_)
Definition: spirv_cross.cpp:3921
void fixup_type_alias()
Definition: spirv_cross.cpp:843
uint32_t get_execution_mode_argument(spv::ExecutionMode mode, uint32_t index=0) const
Definition: spirv_cross.cpp:2808
unsigned index
Definition: spirv_cross.hpp:96
ExecutionModel
Definition: spirv.hpp:68
bool is_conditional(uint32_t next) const
Definition: spirv_cross.hpp:632
uint32_t cull_distance_count
Definition: spirv_cross.hpp:810
bool image_is_comparison(const SPIRType &type, uint32_t id) const
Definition: spirv_cross.cpp:4902
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3291
std::unordered_map< uint32_t, std::unordered_set< uint32_t > > dependency_hierarchy
Definition: spirv_cross.hpp:863
uint32_t expression_type_id(uint32_t id) const
Definition: spirv_cross.cpp:382
std::vector< std::string > declared_extensions
Definition: spirv_cross.hpp:922
static int block
Definition: psp2.c:31
void set_member_qualified_name(uint32_t type_id, uint32_t index, const std::string &name)
Definition: spirv_cross.cpp:1182
uint64_t get_execution_mode_mask() const
Definition: spirv_cross.cpp:2732
const std::string & get_member_qualified_name(uint32_t type_id, uint32_t index) const
Definition: spirv_cross.cpp:1188
std::unordered_set< uint32_t > hoisted_temporaries
Definition: spirv_cross.hpp:805
GLuint index
Definition: glext.h:6671
std::unordered_map< uint32_t, std::unique_ptr< CFG > > function_cfgs
Definition: spirv_cross.hpp:879
bool function_is_pure(const SPIRFunction &func)
Definition: spirv_cross.cpp:211
Nieznany kompilator Urządzenie zostało odłączone od portu Plik już istnieje Zapisywanie do bufora kopii zapasowej Mam połączenie Adres publiczny Ustawianie dysku w zasobniku Opuściłeś grę Dołączyłeś z urządzeniami wejściowymi *s *s dołączył jako gracz u Próba połączenia online nie powiodła ponieważ peer nie działa w trybie RetroArch lub używa starej wersji RetroArch użyjcie tej samej wersji użyj tej samej wersji Ten rdzeń nie obsługuje gry online między architekturami Niepoprawne hasło Klient gry online został odłączony Nie masz uprawnień do grania Żądane urządzenia wejściowe nie są dostępne Gracz s wstrzymał grę Nadaj rdzeniom sprzętowym własny prywatny kontekst Unikaj konieczności przejmowania zmian stanu sprzętu pomiędzy klatkami Dostosuj ustawienia wyglądu ekranu menu Poprawia wydajność kosztem opóźnień i częstszego rwania obrazu Używaj tylko gdy nie możesz uzyskać pełnej prędkości w przeciwnym razie Automatyczne wykrywanie Możliwości Łączenie z portem które nie wymagają nie mogą uczestniczyć w grze sieciowej Konta Cheevos Konta Retro osiągniecia Lista Skanuj zawartość Importuj zawartość Zapytać Zablokuj klatki Sterownik audio Włącz dźwięk Turbo Martwa strefa Maksymalne przesunięcie czasowe dźwięku Szybkość wyjścia Dynamiczna kontrola szybkości audio Dźwiek Poziom głośności Tryb WASAPI Współdzielony bufor WASAPI Automatyczne zastępowanie plików Automatycznie załaduj Shadery Potwierdź Wyjdź Przewiń do góry Przełącz klawiaturę Podstawowe ustawienia menu Informacje Przewiń do góry Przełącz klawiaturę Nie zastępuj SaveRAM przy ładowaniu stanu zapisu Adres URL zasobów Buildbot Zezwalaj na kamerę Oszukać Oszukane pliki Załaduj oszukany plik Oszukane przepustki Osiągnięcia trybu hardcore Odznaki osiągnięć Zablokowany Sprawdź nieoficjalne osiągnięcia Odblokowany Osiągnięcia trybu pełnego Zamknij zawartość Załaduj konfigurację Zapisz konfigurację przy wyjściu Baza danych Rozmiar listy historii Szybkie menu Pobrane pliki Liczniki rdzeniowe Informacje podstawowe Kategoria Nazwa rdzenia Licencja Obsługiwane rozszerzenia Nazwa systemu Załaduj rdzeń Rdzeń Automatycznie wyodrębnij pobrane archiwum Aktualizacja Rdzenia Architektura Rdzeń procesora Menedżer kursorów Menedżer bazy danych Usuń< Treść dir >< Żaden > Szczegóły Dołącz obraz dysku Kontrola dysku Pliki do pobrania Program do pobierania treści Nadpisz DPI Atrapa rdzenia przy zatrzymaniu rdzenia Dynamiczne tło Włącz osiągnięcia Normalny kolor menu Mnożnik prędkości Wyświetl ilość klatek na sekundę Manipulacja klatek Automatycznie ładuj zależne od zawartości opcje rdzenia Plik opcji gry Rozwiązywanie problemów audio wideo Podstawowa kontrola menu Ładowanie zawartości Co to jest rdzeń Historia Obraz Informacja Menu sterowania wszystkich użytkowników Lewy analog Lewy analog Lewy analog Y Lewy analog Prawo analog X Prawy analog Prawo analog Y Prawy analog Spust Pomocniczy A Pomocniczy C Wybierz D pad dół D pad prawo Martwa strefa gałki analogowej Powiąż wszystko Limit czasu powiązania Ukryj niezwiązane podstawowe deskryptory wejściowe Indeks urządzeń Indeks myszy Cykl zapisu Włączanie mapowania gamepada klawiatury Przycisk W dół D pad Przycisk L3 Lewy D pad R3 przycisk Prawy D pad Przycisk Start Przycisk Przycisk Mysz Mysz Mysz Kółko do dołu Kółko w prawo Maksymalna liczba użytkowników Indeks kodów Włącz kody Następny dysk Włącz klawisze skrótów Szybkie przewijanie do przodu Przełączanie pełnoekranowe Przełącznik ostrości gry Przełączanie menu Przełącznik wyciszania dźwięku Przełączanie klawiatury ekranowej Wstrzymaj przełącznik Zresetuj grę Zapisz stan Następny moduł cieniujący Zwolnione tempo Slot zapisu Głośność Wyświetl nakładkę Pokaż nakładki na nakładce Zachowanie typu ankiety Późno Preferuj dotyk Włącz sporządzanie mapy powiązań na nowo Sterowanie Włącz dotyk Okres turbo Opóźnienie Wprowadź autoconfig Usługi holenderski esperanto niemiecki japoński polski rosyjski wietnamski Lewy analog Informacje o rdzeniu Liniowy Załaduj ostatnie Wczytaj zapis Sterownik lokalizacji Zalogowanie rozmowy Ustawienia bazy danych Niebieski Ciemny niebieski NVIDIA Shield Żółty Nieprzezroczystość nagłówka Menu obrotowe przepustnicy częstotliwości wyświetlania klatek Menu filtra liniowego Wygląd Nieprzezroczystość tła Multimedia Filtruj nieznane rozszerzenia Najbliższy Zezwalaj na klientów w trybie slave Wejściowe klatki opóźnień Opóźnij klatki gry online Włącz grę online Uruchom hosta gry online Adres serwera Włącz klienta gry online Hasło serwera Zażądaj urządzenia u Ustawienia gry online Max Udostępnianie wejścia cyfrowego Zahacz Żaden Tryb widza gry online Hasło spontaniczne serwera Port TCP gry online Polecenia sieciowe Informacje o sieci Port zdalnej sieci Nie N A Bez rdzenia Brak dostępnych podstawowych informacji Brak wpisów do wyświetlenia Brak informacji Nie znaleziono hostów gry online Brak liczników wydajności Brak dostępnych pozycji na liście odtwarzania Brak parametrów modułu cieniującego Włącz Aktualizacja online Nakładka na ekranie Przeglądaj archiwum Nakładka Nakładka Ustawienia nakładki Nakładka na ekranie Nadrzędny katalog Nie pracuj w tle Listy odtwarzania Listy odtwarzania Port Prywatność Obsługa analog Ocena CERO CRC32 Deweloper Ocena magazynu Edge Ocena ELSPA Ocena ESRB Seria MD5 Pochodzenie Wydawca Rok wydania Kod seryjny Rozpocznij zawartość Restart Wyjście nagrywania Załaduj konfigurację nagrywania Sterownik MIDI Zapisz wyjścia jako Plik zmian Zapisz plik zmiany rdzenia Usuń plik zmiany rdzenia Wymagany Uruchom RetroArch ponownie Wznów zawartość Retro pad Osiągnięcia Przewijanie granularności Przeglądarka plików Wyświetl ekran startowy Dodaj do ulubionych Zresetuj domyślny rdzeń Uruchom muzykę Zapisz plik Automatyczne załadowanie stanu Zapisz stan Zapisz bieżącą konfigurację Zapisz nadpisania katalogu zawartości Zapisz nową konfigurację Zapisywanie Zeskanuj plik Zrzut ekranu Szukaj Ustawienia Shader Shadery Prosty śnieg Pokaż ustawienia zaawansowane Zamknąć Przejdź do przodu w celu skrócenia czasu oczekiwania Sortuj zapisy w folderach Ukryj ostrzeżenia RunAhead Napisz zapis stanów do treści dir Pliki systemowe znajdują się w katalogu treści Włącz SSH Uruchom zdalny Retro pad Slot zapisu Polecenia STDIN Wstrzymaj wygaszacz ekranu System BIOS Obsługa Data Builda Wsparcie Cocoa Obsługa CoreText Wyświetl DPI metryczne Wyświetl szerokość Wsparcie DirectSound Obsługa dynamicznej biblioteki Wsparcie EGL Wsparcie FFmpeg Wsparcie STB TrueType Nazwa frontendu Wersja Git Wsparcie HLSL Obsługa KMS EGL Obsługa LibretroDB Libxml2 obsługa parowania XML Obsługa interfejsu dowodzenia sieciowego Obsługa OpenAL Obsługa OpenGL Obsługa OpenVG Obsługa nakładek Naładowany Rozładowywanie Obsługa PulseAudio Obsługa Poziom Oceny Retro Obsługa RoarAudio Wsparcie RSound Wsparcie SDL2 Wsparcie SDL1 Przewlekanie wsparcia Obsługa Video4Linux2 Wsparcie Vulkan Wsparcie X11 Wsparcie XVideo Zrób zrzut ekranu Miniatury Miniatury dyspozycji pionowej Zaktualizuj miniatury Zrzuty ekranu Pokaż datę czas Prawdziwe Uruchom Companion UI przy włączeniu Uruchom menu okienkowe przy włączeniu Nie można odczytać skompresowanego pliku Cofnij zapisanie stanu Aktualizacja Zaktualizuj profile joypad Zaktualizuj kody Zaktualizuj bazy danych Zaktualizuj Lakka Zaktualizuj Shadery Slang Kbd Język Użyj wbudowanej przeglądarki zdjęć< Użyj tego katalogu > Konfiguruj współczynnik kształtu Proporcja obrazu Przytnij Wyłącz kompozycję pulpitu Sterownik wideo Filtr wideo Włącz powiadomienia na ekranie Rozmiar powiadomienia Wymuś wyłączenie sRGB FBO Użyj trybu pełnoekranowego Użyj zapisu GPU Trudna synchronizacja z GPU Maksymalne obrazy swapchain Pozycja Y powiadomienia Użyj funkcji Nagrywania po filtrowaniu Szacowana liczba klatek na sekundę na ekranie Obrót Skala całkowita Moduł cieniujący wideo Podgląd parametrów modułu cieniującego Zapisz ustawienie Shadera jako Zapisz ustawienie zawartości katalogu zawartości Włącz udostępniony kontekst sprzętu Włącz filtr miękki Wideo Migotanie Niestandardowy współczynnik proporcji Szerokość Niestandardowy współczynnik kształtu Y Poz Synchronizacja Tryb pełnoekranowy z pełnym ekranem Wysokość okna Pełnoekranowa wysokość Wi Fi Kolor czcionki czerwony Kolor czcionki niebieski Niestandardowy Monochromia Systematyczny Pixel RetroSystem Kolor menu Ciemny Poranny błękit Elektryczny błękit Czerwone dziedzictwo Zwykły Czerwień wulkaniczna Współczynnik skali menu Pokaż kartę Historii Pokaż kartę Listy odtwarzania Pokaż kartę Obraz Pokaż kartę Ustawienia Pokaż kartę Gry Online Motyw ikon menu Ustawienia Shader Włącz lub wyłącz nieoficjalne osiągnięcia i lub funkcje beta do celów testowych Włącz lub wyłącz tabele wyników w grze Nie jeśli tryb Hardcore jest wyłączony Włącz lub wyłącz powiadomienia OSD dla osiągnięć Zmień sterowniki używane przez system Zmień ustawienia rdzenia Zmień nakładkę ekranu i nakładkę klawiatury oraz ustawienia powiadomień na ekranie Zmień ustawienia zapisu Zmień ustawienia interfejsu użytkownika Zmień ustawienia prywatności Zmień domyślne w których znajdują się pliki Skonfiguruj ustawienia serwera i sieci Zmień ustawienia wyjścia audio Zapisuje zmiany w pliku konfiguracyjnym przy wyjściu Zarządzaj i twórz pliki konfiguracyjne Wyświetla bieżącą liczbę klatek na sekundę na ekranie Kombinacja przycisków gamepada do przełączania menu Skonfiguruj elementy sterujące dla tego użytkownika Dołącz lub obsługuj sesję gry online Wyświetl informacje o systemie Włącz lub wyłącz udostępnianie sieciowe folderów Pokaż ukryte pliki katalogi w przeglądarce plików Włącz lub wyłącz zdalny dostęp do wiersza poleceń Ustawia rozmiar okna względem głównego rozmiaru wyświetlania Alternatywnie możesz ustawić szerokość i wysokość okna poniżej dla ustalonego rozmiaru okna Wstawia czarną klatke między klatkami Przydatny dla użytkowników z którzy chcą odtwarzać zawartość aby wyeliminować efekt duchów Określa liczbę jaką procesor może uruchomić przed gdy używana jest Trudna synchronizacja z GPU który ekran wyświetlacza ma być używany Częstotliwość odświeżania zgłoszona przez sterownik ekranu Skanuje sieci bezprzewodowe i nawiązuje połączenie Dodano do ulubionych Dołączony dysk Stosowanie zmian w kodzie Wyciszenie Dźwięku Błąd podczas zapisywania pliku autoconfig Nie można zainicjować autozapisu Blokowanie nadpisywania SRAM bajty Tryb Hardcore stan zapisu i przewijanie do tyłu były wyłączone Skompilowany z API Połączony z Pominięto ładowanie treści Implementacja załaduje ją samodzielnie Plik opcji rdzenia został pomyślnie utworzony Nie można znaleźć zgodnego systemu Nie można otworzyć ścieżki danych Nie można odczytać nagłówka filmu Niezgodność sumy kontrolnej CRC32 między plikiem treści a zapisaną sumą kontrolną w nagłówku pliku odtwarzania Powtórka najprawdopodobniej zsynchronizuje się podczas odtwarzania Dekompresja już trwa Wykryty obszar widoku Odłącz urządzenie od poprawnego portu Wyrzucony Index Błąd Rdzeń Libretro wymaga specjalnych ale żadne nie zostały dostarczone Błąd podczas zapisywania pliku opcji podstawowych Błąd podczas usuwania pliku remap Aplikacja zewnętrzna Dir Wyodrębnianie pliku Nie udało się Nie można przydzielić pamięci na poprawioną zawartość Nie powiodło się wiązanie gniazda Nie można wyodrębnić treści ze skompresowanego pliku Nie udało się załadować Nie udało się załadować pliku filmowego Nie udało się załadować stanu z Nie udało się załatać Nie udało się odebrać pseudonimu Nie można odebrać rozmiaru pseudonimu z hosta Nie udało się usunąć dysku z zasobnika Nie udało się zapisać SRAM Nie udało się wysłać pseudonimu Nie udało się wysłać pseudonimu do klienta Nie udało się wysłać danych SRAM do klienta Nie można uruchomić nagrywania filmu Nie udało się zrobić zrzutu ekranu Nie udało się cofnąć stanu zapisania Błąd krytyczny odebrany w Znajdź stan automatycznego zapisywania w Znaleziono pierwszą ścieżkę danych w pliku Znaleziony moduł cieniujący Opcje Otrzymałem nieprawidłowy indeks dysku Skup się na grze Rdzeń Libretro jest renderowany sprzętowo Musi także korzystać z nagrywania po cieniowaniu Wejdź w kod Wprowadź wstępnie ustawioną nazwę pliku Interfejs Magazyn wymienny w bajtach w megabajtach Frontend dla libretro Załadowany stan z gniazda Brak jednego lub więcej plików oprogramowania układowego Ładowanie pliku historii Pamięć Wygląda na to
Definition: msg_hash_pl.h:2324
uint32_t get_member_decoration(uint32_t id, uint32_t index, spv::Decoration decoration) const
Definition: spirv_cross.cpp:1199
uint32_t length
Definition: spirv_common.hpp:290
std::unordered_map< uint32_t, std::unique_ptr< CFG > > function_cfgs
Definition: spirv_cross.hpp:871
spv::ExecutionModel get_execution_model() const
Definition: spirv_cross.cpp:2837
std::vector< Resource > uniform_buffers
Definition: spirv_cross.hpp:57
const SPIRType & get_type_from_variable(uint32_t id) const
Definition: spirv_cross.cpp:1061
void register_read(uint32_t expr, uint32_t chain, bool forwarded)
Definition: spirv_cross.cpp:287
Definition: query.c:71
size_t range
Definition: spirv_cross.hpp:98
GLsizei GLsizei GLchar * source
Definition: glext.h:6688
T * maybe_get(uint32_t id)
Definition: spirv_cross.hpp:544
std::unordered_set< uint32_t > comparison_ids
Definition: spirv_cross.hpp:827
struct spirv_cross::Compiler::Source source
void build_combined_image_samplers()
Definition: spirv_cross.cpp:3507
uint32_t sampler_id
Definition: spirv_cross.hpp:83
const Bitset & get_execution_mode_bitset() const
Definition: spirv_cross.cpp:2737
void flush_control_dependent_expressions(uint32_t block)
Definition: spirv_cross.cpp:360
const SPIREntryPoint & get_first_entry_point(const std::string &name) const
Definition: spirv_cross.cpp:2963
void set_subpass_input_remapped_components(uint32_t id, uint32_t components)
Definition: spirv_cross.cpp:2853
VariableTypeRemapCallback variable_remap_callback
Definition: spirv_cross.hpp:798
Definition: spirv_common.hpp:803
Definition: spirv_cross.hpp:76
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
const std::vector< std::string > & get_declared_extensions() const
Definition: spirv_cross.cpp:4794
bool begin_function_scope(const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:4621
void push_remap_parameters(const SPIRFunction &func, const uint32_t *args, uint32_t length)
Definition: spirv_cross.cpp:3041
void make_constant_null(uint32_t id, uint32_t type)
Definition: spirv_cross.cpp:4753
Definition: spirv_cross.hpp:105
void set_execution_mode(spv::ExecutionMode mode, uint32_t arg0=0, uint32_t arg1=0, uint32_t arg2=0)
Definition: spirv_cross.cpp:2742
void update_active_builtins()
Definition: spirv_cross.cpp:4485
const std::string & get_member_decoration_string(uint32_t id, uint32_t index, spv::Decoration decoration) const
void unset_execution_mode(spv::ExecutionMode mode)
Definition: spirv_cross.cpp:2768
std::unordered_set< uint32_t > loop_merge_targets
Definition: spirv_cross.hpp:586
void set_variable_type_remap_callback(VariableTypeRemapCallback cb)
Definition: spirv_cross.hpp:415
std::vector< Resource > push_constant_buffers
Definition: spirv_cross.hpp:68
spv::StorageClass get_storage_class(uint32_t id) const
Definition: spirv_cross.cpp:1360
JSON_Parser_EncodingDetectedHandler handler
Definition: jsonsax_full.h:561
bool is_immutable(uint32_t id) const
Definition: spirv_cross.cpp:432
bool buffer_get_hlsl_counter_buffer(uint32_t id, uint32_t &counter_id) const
Definition: spirv_cross.cpp:4722
AnalyzeVariableScopeAccessHandler(Compiler &compiler_, SPIRFunction &entry_)
Definition: spirv_cross.cpp:3650
virtual void set_current_block(const SPIRBlock &)
Definition: spirv_cross.hpp:696
SPIRVariable * maybe_get_backing_variable(uint32_t chain)
Definition: spirv_cross.cpp:270
ActiveBuiltinHandler(Compiler &compiler_)
Definition: spirv_cross.hpp:780
Definition: spirv_common.hpp:97
const std::string & get_cleansed_entry_point_name(const std::string &name, spv::ExecutionModel execution_model) const
Definition: spirv_cross.cpp:3007
std::vector< uint32_t > spirv
Definition: spirv_cross.hpp:514
void notify_variable_access(uint32_t id, uint32_t block)
Definition: spirv_cross.cpp:3712
BaseType
Definition: spirv_common.hpp:376
Definition: spirv_common.hpp:554
const SPIRType & expression_type(uint32_t id) const
Definition: spirv_cross.cpp:412
void set_enabled_interface_variables(std::unordered_set< uint32_t > active_variables)
Definition: spirv_cross.cpp:676
bool hlsl
Definition: spirv_cross.hpp:579
Definition: spirv_cfg.hpp:26
Unknown compiler Device disconnected from port File already exists Saving to backup buffer Got connection No arguments supplied and no menu builtin
Definition: msg_hash_eo.h:34
bool block_is_outside_flow_control_from_block(const SPIRBlock &from, const SPIRBlock &to)
Definition: spirv_cross.cpp:2394
Definition: spirv_cross.hpp:574
BuiltIn
Definition: spirv.hpp:402
Definition: Common.h:43
std::vector< Resource > atomic_counters
Definition: spirv_cross.hpp:64
bool buffer_is_hlsl_counter_buffer(uint32_t id) const
Definition: spirv_cross.cpp:4702
Definition: spirv_cross.hpp:872
SPIRFunction * current_function
Definition: spirv_cross.hpp:520
static void expr(LexState *ls, expdesc *v)
Definition: lparser.c:1078
uint32_t variable_id
Definition: spirv_cross.hpp:911
std::stack< SPIRFunction * > functions
Definition: spirv_cross.hpp:757
Compiler & compiler
Definition: spirv_cross.hpp:786
std::unordered_map< uint32_t, SPIREntryPoint > entry_points
Definition: spirv_cross.hpp:570
GLenum GLenum dst
Definition: glext.h:6980
std::vector< CombinedImageSampler > combined_image_samplers
Definition: spirv_cross.hpp:671
Definition: spirv_cross.hpp:778
SPIRFunction & entry
Definition: spirv_cross.hpp:895
Bitset get_buffer_block_flags(uint32_t id) const
Definition: spirv_cross.cpp:4286
GLuint GLuint end
Definition: glext.h:6292
const SPIREntryPoint & get_entry_point() const
bool is_member_builtin(const SPIRType &type, uint32_t index, spv::BuiltIn *builtin) const
Definition: spirv_cross.cpp:503
std::string name
Definition: spirv_cross.hpp:113
bool force_recompile
Definition: spirv_cross.hpp:658
bool is_single_block_loop(uint32_t next) const
Definition: spirv_cross.hpp:615
size_t offset
Definition: spirv_cross.hpp:97
CombinedImageSamplerHandler(Compiler &compiler_)
Definition: spirv_cross.hpp:745
Definition: spirv_common.hpp:686
bool handle(spv::Op op, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:4605
uint32_t get_decoration(uint32_t id, spv::Decoration decoration) const
Definition: spirv_cross.cpp:1418
bool has_decoration(uint32_t id, spv::Decoration decoration) const
Definition: spirv_cross.cpp:1395
std::vector< BufferRange > & ranges
Definition: spirv_cross.hpp:723
std::vector< uint32_t > global_struct_cache
Definition: spirv_cross.hpp:794
uint64_t get_decoration_mask(uint32_t id) const
Definition: spirv_cross.cpp:1384
virtual bool end_function_scope(const uint32_t *, uint32_t)
Definition: spirv_cross.hpp:705
bool execution_is_branchless(const SPIRBlock &from, const SPIRBlock &to) const
Definition: spirv_cross.cpp:2444
const std::string & get_decoration_string(uint32_t id, spv::Decoration decoration) const
Definition: spirv_cross.cpp:1400
Definition: spirv_cross.hpp:106
virtual bool handle(spv::Op opcode, const uint32_t *args, uint32_t length)=0
std::vector< Resource > subpass_inputs
Definition: spirv_cross.hpp:61
virtual const std::string get_fallback_member_name(uint32_t index) const
Definition: spirv_cross.hpp:228
bool variable_storage_is_aliased(const SPIRVariable &var)
Definition: spirv_cross.cpp:100
uint32_t constant_id
Definition: spirv_cross.hpp:91
std::vector< Resource > stage_inputs
Definition: spirv_cross.hpp:59
std::vector< Resource > storage_images
Definition: spirv_cross.hpp:62
bool get_remapped_variable_state(uint32_t id) const
Definition: spirv_cross.cpp:2848
bool handle(spv::Op op, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:3932
ContinueBlockType
Definition: spirv_common.hpp:597
unsigned __int64 uint64_t
Definition: stdint.h:136
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
std::vector< uint32_t > global_variables
Definition: spirv_cross.hpp:522
unsigned int uint32_t
Definition: stdint.h:126
bool has_active_builtin(spv::BuiltIn builtin, spv::StorageClass storage)
Definition: spirv_cross.cpp:4496
virtual const std::string get_block_fallback_name(uint32_t id) const
Definition: spirv_cross.cpp:1375
static bool is_desktop_only_format(spv::ImageFormat format)
Definition: spirv_cross.cpp:4869
uint32_t type_id
Definition: spirv_cross.hpp:35
std::vector< Variant > ids
Definition: spirv_cross.hpp:517
uint32_t entry_point
Definition: spirv_cross.hpp:567
uint32_t remap_parameter(uint32_t id)
Definition: spirv_cross.cpp:3057
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:4367
virtual size_t get_declared_struct_member_size(const SPIRType &struct_type, uint32_t index) const
Definition: spirv_cross.cpp:2573
ImageFormat
Definition: spirv.hpp:180
InterfaceVariableAccessHandler(const Compiler &compiler_, std::unordered_set< uint32_t > &variables_)
Definition: spirv_cross.hpp:731
void mark_used_as_array_length(uint32_t id)
Definition: spirv_cross.cpp:3552
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6844
bool is_loop_break(uint32_t next) const
Definition: spirv_cross.hpp:627
Definition: spirv_common.hpp:856
Method
Definition: spirv_common.hpp:590
bool handle(spv::Op opcode, const uint32_t *args, uint32_t length) override
Definition: spirv_cross.cpp:4530
uint32_t id
Definition: spirv_cross.hpp:30
uint32_t type_struct_member_array_stride(const SPIRType &type, uint32_t index) const
Definition: spirv_cross.cpp:2540
bool get_binary_offset_for_decoration(uint32_t id, spv::Decoration decoration, uint32_t &word_offset) const
Definition: spirv_cross.cpp:1505