All files / run/cloud_picture/domain_layer/repo/webgpu TextureArrayWebGPUCPRepo.bs.js

95.65% Statements 22/23
100% Branches 0/0
87.5% Functions 7/8
95.65% Lines 22/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73    31x 31x 31x             138x 138x                         16x       72x 72x               24x       33x 33x               24x       33x 33x             31x 31x 31x 31x 31x 31x 31x 31x    
'use strict';
 
var Caml_option = require("bs-platform/lib/js/caml_option.js");
var CPRepo$Wonderjs = require("../../../infrastructure_layer/data/container/CPRepo.bs.js");
var ImmutableHashMap$Wonderjs = require("../../../../../construct/domain_layer/library/structure/hash_map/ImmutableHashMap.bs.js");
 
function _getTextureArray(param) {
  return CPRepo$Wonderjs.getWebGPU(undefined).textureArray;
}
 
function _setTextureArray(textureArray) {
  var init = CPRepo$Wonderjs.getWebGPU(undefined);
  return CPRepo$Wonderjs.setWebGPU({
              device: init.device,
              window: init.window,
              adapter: init.adapter,
              context: init.context,
              queue: init.queue,
              swapChainFormat: init.swapChainFormat,
              swapChain: init.swapChain,
              textureArray: textureArray
            });
}
 
function getLayerIndex(imageId) {
  return ImmutableHashMap$Wonderjs.get(CPRepo$Wonderjs.getWebGPU(undefined).textureArray.layerIndexMap, imageId);
}
 
function setLayerIndex(imageId, layerIndex) {
  var textureArray = CPRepo$Wonderjs.getWebGPU(undefined).textureArray;
  return _setTextureArray({
              layerIndexMap: ImmutableHashMap$Wonderjs.set(textureArray.layerIndexMap, imageId, layerIndex),
              textureArrayView: textureArray.textureArrayView,
              textureSampler: textureArray.textureSampler
            });
}
 
function getTextureArrayView(param) {
  return CPRepo$Wonderjs.getWebGPU(undefined).textureArray.textureArrayView;
}
 
function setTextureArrayView(textureArrayView) {
  var init = CPRepo$Wonderjs.getWebGPU(undefined).textureArray;
  return _setTextureArray({
              layerIndexMap: init.layerIndexMap,
              textureArrayView: Caml_option.some(textureArrayView),
              textureSampler: init.textureSampler
            });
}
 
function getTextureSampler(param) {
  return CPRepo$Wonderjs.getWebGPU(undefined).textureArray.textureSampler;
}
 
function setTextureSampler(textureSampler) {
  var init = CPRepo$Wonderjs.getWebGPU(undefined).textureArray;
  return _setTextureArray({
              layerIndexMap: init.layerIndexMap,
              textureArrayView: init.textureArrayView,
              textureSampler: Caml_option.some(textureSampler)
            });
}
 
exports._getTextureArray = _getTextureArray;
exports._setTextureArray = _setTextureArray;
exports.getLayerIndex = getLayerIndex;
exports.setLayerIndex = setLayerIndex;
exports.getTextureArrayView = getTextureArrayView;
exports.setTextureArrayView = setTextureArrayView;
exports.getTextureSampler = getTextureSampler;
exports.setTextureSampler = setTextureSampler;
/* CPRepo-Wonderjs Not a pure module */