mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-16 21:39:29 -07:00
Unifying the interfaces of regl and webgpu makePass and makePipeline.
This commit is contained in:
@@ -76,5 +76,5 @@ export default (context, getInputs) => {
|
||||
renderPass.endPass();
|
||||
};
|
||||
|
||||
return makePass(ready, setSize, getOutputs, execute);
|
||||
return makePass(getOutputs, ready, setSize, execute);
|
||||
};
|
||||
|
||||
@@ -161,5 +161,5 @@ export default (context, getInputs) => {
|
||||
renderPass.endPass();
|
||||
};
|
||||
|
||||
return makePass(ready, setSize, getOutputs, execute);
|
||||
return makePass(getOutputs, ready, setSize, execute);
|
||||
};
|
||||
|
||||
@@ -193,5 +193,5 @@ export default (context, getInputs) => {
|
||||
renderPass.endPass();
|
||||
};
|
||||
|
||||
return makePass(ready, setSize, getOutputs, execute);
|
||||
return makePass(getOutputs, ready, setSize, execute);
|
||||
};
|
||||
|
||||
@@ -83,5 +83,5 @@ export default (context, getInputs) => {
|
||||
renderPass.endPass();
|
||||
};
|
||||
|
||||
return makePass(ready, setSize, getOutputs, execute);
|
||||
return makePass(getOutputs, ready, setSize, execute);
|
||||
};
|
||||
|
||||
@@ -125,5 +125,5 @@ export default (context, getInputs) => {
|
||||
renderPass.endPass();
|
||||
};
|
||||
|
||||
return makePass(ready, setSize, getOutputs, execute);
|
||||
return makePass(getOutputs, ready, setSize, execute);
|
||||
};
|
||||
|
||||
@@ -80,10 +80,10 @@ const makeBindGroup = (device, pipeline, index, entries) =>
|
||||
})),
|
||||
});
|
||||
|
||||
const makePass = (ready, setSize, getOutputs, execute) => ({
|
||||
const makePass = (getOutputs, ready, setSize, execute) => ({
|
||||
getOutputs: getOutputs ?? (() => ({})),
|
||||
ready: ready ?? Promise.resolve(),
|
||||
setSize: setSize ?? (() => {}),
|
||||
getOutputs: getOutputs ?? (() => ({})),
|
||||
execute: execute ?? (() => {}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user