Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ibgreen committed Mar 4, 2024
1 parent 0bd12b0 commit 7f096db
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
5 changes: 4 additions & 1 deletion modules/core-tests/test/adapter/resources/texture.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ test('Texture#depth/stencil formats', async t => {
for (const device of await getTestDevices()) {
for (const format of DEPTH_STENCIL_FORMATS) {
t.ok(device.isTextureFormatSupported(format), `${device.info.type} ${format} is supported`);
t.notOk(device.isTextureFormatFilterable(format), `${device.info.type} ${format} is not filterable`);
t.notOk(
device.isTextureFormatFilterable(format),
`${device.info.type} ${format} is not filterable`
);
const texture = device.createTexture({format});
t.ok(texture instanceof Texture, `Texture ${format} construction successful`);
}
Expand Down
15 changes: 7 additions & 8 deletions modules/webgl/src/adapter/converters/texture-formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ export function isTextureFormatFilterable(
}
if (format.startsWith('depth') || format.startsWith('stencil')) {
return false;
}
}
try {
const decoded = decodeTextureFormat(format);
if (decoded.signed) {
Expand Down Expand Up @@ -607,14 +607,13 @@ export function getWebGLTextureParameters(format: TextureFormat) {
const decoded = decodeTextureFormat(format);
return {
format: webglFormat,
dataFormat: formatData?.dataFormat || getWebGLPixelDataFormat(
decoded.format,
decoded.integer,
decoded.normalized,
webglFormat
),
dataFormat:
formatData?.dataFormat ||
getWebGLPixelDataFormat(decoded.format, decoded.integer, decoded.normalized, webglFormat),
// depth formats don't have a type
type: decoded.dataType ? getGLFromVertexType(decoded.dataType) : formatData?.types?.[0] || GL.UNSIGNED_BYTE,
type: decoded.dataType
? getGLFromVertexType(decoded.dataType)
: formatData?.types?.[0] || GL.UNSIGNED_BYTE,
// @ts-expect-error
compressed: decoded.compressed
};
Expand Down

0 comments on commit 7f096db

Please sign in to comment.