MCPcopy Create free account
hub / github.com/carbonengine/trinity / LibraryInput

Class LibraryInput

shadercompiler/python/shadercompiler/effectinfo.py:263–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261
262
263class LibraryInput(object):
264 def __init__(self, stream, string_table, version):
265 self.registers = []
266 for input_index in range(stream.read_uint8()):
267 self.registers.append(ShaderRegister(stream, version, 0))
268
269 self.static_samplers = []
270 for sampler_index in range(stream.read_uint8()):
271 self.static_samplers.append(StaticSampler(stream))
272
273 self.constants = []
274 for i in range(stream.read_uint32()):
275 self.constants.append(Constant(stream, string_table, version))
276
277 constant_value_size = stream.read_uint32()
278 constant_value_offset = stream.read_uint32()
279 const_data = string_table.get_blob(constant_value_offset, constant_value_size)
280 for const in self.constants:
281 const.read_default_value(const_data)
282
283 self.resources = []
284 for i in range(stream.read_uint8()):
285 self.resources.append(Resource(stream, string_table, version))
286
287 self.samplers = []
288 for i in range(stream.read_uint8()):
289 self.samplers.append(Sampler(stream, string_table, version))
290
291 self.uavs = []
292 for i in range(stream.read_uint8()):
293 self.uavs.append(UAV(stream, string_table, version))
294
295 self.annotations = {}
296 for j in range(stream.read_uint8()):
297 annotation = Annotation(stream, string_table)
298 self.annotations[annotation.name] = annotation
299
300
301class Stage(object):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected