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

96.43% Statements 27/28
100% Branches 0/0
90% Functions 9/10
96.43% Lines 27/28

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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95    17x 17x 17x             143x 143x                         205x       72x 72x                 24x       33x 33x                 24x       33x 33x                 217x       5x 5x                     17x 17x 17x 17x 17x 17x 17x 17x 17x 17x    
'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,
              layerSize: textureArray.layerSize
            });
}
 
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,
              layerSize: init.layerSize
            });
}
 
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),
              layerSize: init.layerSize
            });
}
 
function getTextureArrayLayerSize(param) {
  return CPRepo$Wonderjs.getWebGPU(undefined).textureArray.layerSize;
}
 
function setTextureArrayLayerSize(width, height) {
  var init = CPRepo$Wonderjs.getWebGPU(undefined).textureArray;
  return _setTextureArray({
              layerIndexMap: init.layerIndexMap,
              textureArrayView: init.textureArrayView,
              textureSampler: init.textureSampler,
              layerSize: [
                width,
                height
              ]
            });
}
 
exports._getTextureArray = _getTextureArray;
exports._setTextureArray = _setTextureArray;
exports.getLayerIndex = getLayerIndex;
exports.setLayerIndex = setLayerIndex;
exports.getTextureArrayView = getTextureArrayView;
exports.setTextureArrayView = setTextureArrayView;
exports.getTextureSampler = getTextureSampler;
exports.setTextureSampler = setTextureSampler;
exports.getTextureArrayLayerSize = getTextureArrayLayerSize;
exports.setTextureArrayLayerSize = setTextureArrayLayerSize;
/* CPRepo-Wonderjs Not a pure module */