这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,7 @@ Textures {#textures}

<script type=idl>
interface GPUTexture : GPUObjectBase {
GPUTextureView createView(GPUTextureViewDescriptor descriptor);
GPUTextureView createDefaultView();
GPUTextureView createView(optional GPUTextureViewDescriptor descriptor);

void destroy();
};
Expand Down Expand Up @@ -303,16 +302,22 @@ interface GPUTextureView : GPUObjectBase {

<script type=idl>
dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase {
required GPUTextureFormat format;
required GPUTextureViewDimension dimension;
required GPUTextureAspect aspect;
GPUTextureFormat format;
GPUTextureViewDimension dimension;
GPUTextureAspect aspect = "all";
u32 baseMipLevel = 0;
u32 mipLevelCount = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should "default texture view" cover all the mipmap levels and the array layers instead of the first ones?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it absolutely should (great point!), if we are going this way
we could make the mipLevelCount=0 to have this special semantics here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Would you open another PR for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in #407 . PTAL, thanks!

u32 baseArrayLayer = 0;
u32 arrayLayerCount = 1;
};
</script>

* {{GPUTextureViewDescriptor/format}}:
If unspecified, defaults to the format of the texture.

* {{GPUTextureViewDescriptor/dimension}}:
If unspecified, defaults to the dimension of the texture.

<script type=idl>
enum GPUTextureViewDimension {
"1d",
Expand Down