Remove sig deprecation.

This CL removes support for the `sig` member in `frexp`. It is now an
error if `sig` is used, the deprecation is removed.
`fract` should be used instead.

Bug: tint:1766
Change-Id: I991544b675caf31f22c8c9472a60c77811ff4efd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117920
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
dan sinclair
2023-01-30 15:34:49 +00:00
committed by Dawn LUCI CQ
parent 97ad405216
commit f374b819d9
15 changed files with 8 additions and 271 deletions

View File

@@ -1,7 +0,0 @@
// TODO(crbug.com/tint/1757): Remove this test once the deprecation period for `frexp().sig` is over
@compute @workgroup_size(1)
fn main() {
let res = frexp(1.23);
let exp : i32 = res.exp;
let sig : f32 = res.sig;
}

View File

@@ -1,15 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
struct frexp_result_f32 {
float fract;
int exp;
};
[numthreads(1, 1, 1)]
void main() {
const frexp_result_f32 res = {0.61500001f, 1};
const int exp = res.exp;
const float sig = res.fract;
return;
}

View File

@@ -1,15 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
struct frexp_result_f32 {
float fract;
int exp;
};
[numthreads(1, 1, 1)]
void main() {
const frexp_result_f32 res = {0.61500001f, 1};
const int exp = res.exp;
const float sig = res.fract;
return;
}

View File

@@ -1,23 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
#version 310 es
struct frexp_result_f32 {
float fract;
int exp;
};
void tint_symbol() {
frexp_result_f32 res = frexp_result_f32(0.61500001f, 1);
int tint_symbol_1 = res.exp;
float sig = res.fract;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
tint_symbol();
return;
}

View File

@@ -1,19 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
#include <metal_stdlib>
using namespace metal;
struct frexp_result_f32 {
float fract;
int exp;
};
kernel void tint_symbol() {
frexp_result_f32 const res = frexp_result_f32{.fract=0.61500001f, .exp=1};
int const exp = res.exp;
float const sig = res.fract;
return;
}

View File

@@ -1,33 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 13
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
OpName %__frexp_result_f32 "__frexp_result_f32"
OpMemberName %__frexp_result_f32 0 "fract"
OpMemberName %__frexp_result_f32 1 "exp"
OpMemberDecorate %__frexp_result_f32 0 Offset 0
OpMemberDecorate %__frexp_result_f32 1 Offset 4
%void = OpTypeVoid
%1 = OpTypeFunction %void
%float = OpTypeFloat 32
%int = OpTypeInt 32 1
%__frexp_result_f32 = OpTypeStruct %float %int
%float_0_61500001 = OpConstant %float 0.61500001
%int_1 = OpConstant %int 1
%10 = OpConstantComposite %__frexp_result_f32 %float_0_61500001 %int_1
%main = OpFunction %void None %1
%4 = OpLabel
%11 = OpCompositeExtract %int %10 1
%12 = OpCompositeExtract %float %10 0
OpReturn
OpFunctionEnd

View File

@@ -1,10 +0,0 @@
bug/tint/1757.wgsl:6:25 warning: use of deprecated language feature: 'sig' has been renamed to 'fract'
let sig : f32 = res.sig;
^^^
@compute @workgroup_size(1)
fn main() {
let res = frexp(1.23);
let exp : i32 = res.exp;
let sig : f32 = res.sig;
}