From 38627e895a207c5abc3e3ede2f2e9c800019095f Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 15 Jun 2020 18:32:06 -0400 Subject: [PATCH 1/5] Add maxAnisotropy property --- spec/index.bs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/index.bs b/spec/index.bs index 1ece7fc0c6..962af9ef2d 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1786,6 +1786,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { float lodMinClamp = 0; float lodMaxClamp = 0xffffffff; // TODO: What should this be? Was Number.MAX_VALUE. GPUCompareFunction compare; + unsigned short maxAnisotropy = 1; }; @@ -1801,8 +1802,10 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { maximum levels of detail, respectively, used internally when sampling a texture. - If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified {{GPUCompareFunction}}. +- {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler. Issue: explain how LOD is calculated and if there are differences here between platforms. +Issue: explain what anisotropic sampling is {{GPUAddressMode}} describes the behavior of the sampler if the sample footprint extends beyond the bounds of the sampled texture. @@ -1918,6 +1921,7 @@ enum GPUCompareFunction { - |descriptor|.{{GPUSamplerDescriptor/lodMinClamp}} is greater than or equal to 0. - |descriptor|.{{GPUSamplerDescriptor/lodMaxClamp}} is greater than or equal to |descriptor|.{{GPUSamplerDescriptor/lodMinClamp}}. + - |descriptor|.{{GPUSamplerDescriptor/maxAnisotropy}} is between 1 and 16, inclusive. ### {{GPUDevice}}.createSampler(descriptor) ### {#sampler-createsampler} From 8c23ac300b0cfdff14f6a8661eb0cd3b7dd4f72a Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Mon, 22 Jun 2020 17:05:10 -0400 Subject: [PATCH 2/5] Make anisotropy range non-normative --- spec/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/index.bs b/spec/index.bs index 962af9ef2d..ced7c24f9e 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1803,6 +1803,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { - If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified {{GPUCompareFunction}}. - {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler. + Most implementations support values in range between 1 and 16, inclusive. Issue: explain how LOD is calculated and if there are differences here between platforms. Issue: explain what anisotropic sampling is @@ -1921,7 +1922,6 @@ enum GPUCompareFunction { - |descriptor|.{{GPUSamplerDescriptor/lodMinClamp}} is greater than or equal to 0. - |descriptor|.{{GPUSamplerDescriptor/lodMaxClamp}} is greater than or equal to |descriptor|.{{GPUSamplerDescriptor/lodMinClamp}}. - - |descriptor|.{{GPUSamplerDescriptor/maxAnisotropy}} is between 1 and 16, inclusive. ### {{GPUDevice}}.createSampler(descriptor) ### {#sampler-createsampler} From e52b8145831324bbaa155ba4f68226478012d114 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 23 Jun 2020 11:07:52 -0400 Subject: [PATCH 3/5] Make it a Note --- spec/index.bs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/index.bs b/spec/index.bs index ced7c24f9e..c0388e6df6 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1803,7 +1803,8 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { - If {{GPUSamplerDescriptor/compare}} is provided, the sampler will be a comparison sampler with the specified {{GPUCompareFunction}}. - {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler. - Most implementations support values in range between 1 and 16, inclusive. + +Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive. Issue: explain how LOD is calculated and if there are differences here between platforms. Issue: explain what anisotropic sampling is From 8e93e08a87c5a56b2e04f551bbc136fb0e24a4be Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Tue, 23 Jun 2020 12:01:18 -0400 Subject: [PATCH 4/5] Update spec/index.bs Co-authored-by: Kai Ninomiya --- spec/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/index.bs b/spec/index.bs index c0388e6df6..d77459d29c 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1804,7 +1804,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { {{GPUCompareFunction}}. - {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler. -Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive. + Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive. Issue: explain how LOD is calculated and if there are differences here between platforms. Issue: explain what anisotropic sampling is From d67d16e04c9ea2d4adc2a3bc23a4355e13ff08fe Mon Sep 17 00:00:00 2001 From: Kai Ninomiya Date: Tue, 23 Jun 2020 09:19:46 -0700 Subject: [PATCH 5/5] less unnecessary indentation --- spec/index.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/index.bs b/spec/index.bs index d77459d29c..9cac5cf8e7 100644 --- a/spec/index.bs +++ b/spec/index.bs @@ -1804,7 +1804,7 @@ dictionary GPUSamplerDescriptor : GPUObjectDescriptorBase { {{GPUCompareFunction}}. - {{GPUSamplerDescriptor/maxAnisotropy}} specifies the maximum anisotropy value clamp used by the sampler. - Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive. + Note: most implementations support {{GPUSamplerDescriptor/maxAnisotropy}} values in range between 1 and 16, inclusive. Issue: explain how LOD is calculated and if there are differences here between platforms. Issue: explain what anisotropic sampling is