Backed out changeset 6c231ed79678 (bug 1880013) for causing wrench bustages CLOSED TREE

This commit is contained in:
Cristian Tuns 2024-02-19 17:16:09 -05:00
parent 6168506717
commit cb20af318d
10 changed files with 276 additions and 28 deletions

4
Cargo.lock generated
View file

@ -2357,9 +2357,9 @@ dependencies = [
[[package]] [[package]]
name = "glslopt" name = "glslopt"
version = "0.1.10" version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee5be629003d587bab188f3e2e3b010aa2cde7c41ec967b3a244f388d4d81877" checksum = "74a3f5c04450dfdadb4b08f6e5ee6f5110f674de1acbd6199bfec68392a8cbaf"
dependencies = [ dependencies = [
"cc", "cc",
] ]

View file

@ -23,7 +23,7 @@ sw_compositor = ["swgl"]
[build-dependencies] [build-dependencies]
build-parallel = "0.1.2" build-parallel = "0.1.2"
glslopt = "0.1.10" glslopt = "0.1.9"
webrender_build = { version = "0.0.2", path = "../webrender_build" } webrender_build = { version = "0.0.2", path = "../webrender_build" }
[dependencies] [dependencies]

View file

@ -246,13 +246,6 @@ user-id = 84794
user-login = "jamienicol" user-login = "jamienicol"
user-name = "Jamie Nicol" user-name = "Jamie Nicol"
[[publisher.glslopt]]
version = "0.1.10"
when = "2024-02-13"
user-id = 84794
user-login = "jamienicol"
user-name = "Jamie Nicol"
[[publisher.h2]] [[publisher.h2]]
version = "0.3.22" version = "0.3.22"
when = "2023-11-15" when = "2023-11-15"

File diff suppressed because one or more lines are too long

View file

@ -3,28 +3,21 @@
# When uploading crates to the registry Cargo will automatically # When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility # "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies # with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies. # to registry (e.g., crates.io) dependencies
# #
# If you are reading this file be aware that the original Cargo.toml # If you believe there's an error in this file please file an
# will likely look very different (and much more reasonable). # issue against the rust-lang/cargo repository. If you're
# See Cargo.toml.orig for the original contents. # editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
[package] [package]
edition = "2018" edition = "2018"
name = "glslopt" name = "glslopt"
version = "0.1.10" version = "0.1.9"
authors = ["Jamie Nicol <jnicol@mozilla.com>"] authors = ["Jamie Nicol <jnicol@mozilla.com>"]
description = "Optimizes GLSL shader code" description = "Optimizes GLSL shader code"
readme = "README.md" keywords = ["opengl", "gl", "gles", "glsl", "shader"]
keywords = [
"opengl",
"gl",
"gles",
"glsl",
"shader",
]
license = "MIT" license = "MIT"
repository = "https://github.com/jamienicol/glslopt-rs" repository = "https://github.com/jamienicol/glslopt-rs"
[build-dependencies.cc] [build-dependencies.cc]
version = "1.0" version = "1.0"

View file

@ -0,0 +1,49 @@
/**************************************************************************
*
* Copyright 2015 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
#ifndef _C99_ALLOCA_H_
#define _C99_ALLOCA_H_
#if defined(_MSC_VER)
# include <malloc.h>
# define alloca _alloca
#elif defined(__sun) || defined(__CYGWIN__)
# include <alloca.h>
#else /* !defined(_MSC_VER) */
# include <stdlib.h>
#endif /* !defined(_MSC_VER) */
#endif

View file

@ -0,0 +1,211 @@
/**************************************************************************
*
* Copyright 2007-2015 VMware, Inc.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sub license, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice (including the
* next paragraph) shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
* IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**************************************************************************/
/**
* Wrapper for math.h which makes sure we have definitions of all the c99
* functions.
*/
#ifndef _C99_MATH_H_
#define _C99_MATH_H_
#include <math.h>
#include "c99_compat.h"
/* This is to ensure that we get M_PI, etc. definitions */
#if defined(_MSC_VER) && !defined(_USE_MATH_DEFINES)
#error _USE_MATH_DEFINES define required when building with MSVC
#endif
#if !defined(_MSC_VER) && \
__STDC_VERSION__ < 199901L && \
(!defined(_XOPEN_SOURCE) || _XOPEN_SOURCE < 600) && \
!defined(__cplusplus)
static inline long int
lrint(double d)
{
long int rounded = (long int)(d + 0.5);
if (d - floor(d) == 0.5) {
if (rounded % 2 != 0)
rounded += (d > 0) ? -1 : 1;
}
return rounded;
}
static inline long int
lrintf(float f)
{
long int rounded = (long int)(f + 0.5f);
if (f - floorf(f) == 0.5f) {
if (rounded % 2 != 0)
rounded += (f > 0) ? -1 : 1;
}
return rounded;
}
static inline long long int
llrint(double d)
{
long long int rounded = (long long int)(d + 0.5);
if (d - floor(d) == 0.5) {
if (rounded % 2 != 0)
rounded += (d > 0) ? -1 : 1;
}
return rounded;
}
static inline long long int
llrintf(float f)
{
long long int rounded = (long long int)(f + 0.5f);
if (f - floorf(f) == 0.5f) {
if (rounded % 2 != 0)
rounded += (f > 0) ? -1 : 1;
}
return rounded;
}
static inline float
exp2f(float f)
{
return powf(2.0f, f);
}
static inline double
exp2(double d)
{
return pow(2.0, d);
}
#endif /* C99 */
/*
* signbit() is a macro on Linux. Not available on Windows.
*/
#ifndef signbit
#define signbit(x) ((x) < 0.0f)
#endif
#ifndef M_PI
#define M_PI (3.14159265358979323846)
#endif
#ifndef M_E
#define M_E (2.7182818284590452354)
#endif
#ifndef M_LOG2E
#define M_LOG2E (1.4426950408889634074)
#endif
#ifndef FLT_MAX_EXP
#define FLT_MAX_EXP 128
#endif
#if defined(fpclassify)
/* ISO C99 says that fpclassify is a macro. Assume that any implementation
* of fpclassify, whether it's in a C99 compiler or not, will be a macro.
*/
#elif defined(__cplusplus)
/* For C++, fpclassify() should be defined in <cmath> */
#elif defined(_MSC_VER)
/* Not required on VS2013 and above. Oddly, the fpclassify() function
* doesn't exist in such a form on MSVC. This is an implementation using
* slightly different lower-level Windows functions.
*/
#include <float.h>
static inline enum {FP_NAN, FP_INFINITE, FP_ZERO, FP_SUBNORMAL, FP_NORMAL}
fpclassify(double x)
{
switch(_fpclass(x)) {
case _FPCLASS_SNAN: /* signaling NaN */
case _FPCLASS_QNAN: /* quiet NaN */
return FP_NAN;
case _FPCLASS_NINF: /* negative infinity */
case _FPCLASS_PINF: /* positive infinity */
return FP_INFINITE;
case _FPCLASS_NN: /* negative normal */
case _FPCLASS_PN: /* positive normal */
return FP_NORMAL;
case _FPCLASS_ND: /* negative denormalized */
case _FPCLASS_PD: /* positive denormalized */
return FP_SUBNORMAL;
case _FPCLASS_NZ: /* negative zero */
case _FPCLASS_PZ: /* positive zero */
return FP_ZERO;
default:
/* Should never get here; but if we do, this will guarantee
* that the pattern is not treated like a number.
*/
return FP_NAN;
}
}
#else
#error "Need to include or define an fpclassify function"
#endif
/* Since C++11, the following functions are part of the std namespace. Their C
* counteparts should still exist in the global namespace, however cmath
* undefines those functions, which in glibc 2.23, are defined as macros rather
* than functions as in glibc 2.22.
*/
#if __cplusplus >= 201103L && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 23))
#include <cmath>
using std::fpclassify;
using std::isfinite;
using std::isinf;
using std::isnan;
using std::isnormal;
using std::signbit;
using std::isgreater;
using std::isgreaterequal;
using std::isless;
using std::islessequal;
using std::islessgreater;
using std::isunordered;
#endif
#endif /* #define _C99_MATH_H_ */

View file

@ -118,7 +118,7 @@
* Converts double trunc, ceil, floor, round to fract * Converts double trunc, ceil, floor, round to fract
*/ */
#include <math.h> #include "c99_math.h"
#include "program/prog_instruction.h" /* for swizzle */ #include "program/prog_instruction.h" /* for swizzle */
#include "compiler/glsl_types.h" #include "compiler/glsl_types.h"
#include "ir.h" #include "ir.h"

View file

@ -24,8 +24,9 @@
#ifndef _ROUNDING_H #ifndef _ROUNDING_H
#define _ROUNDING_H #define _ROUNDING_H
#include "c99_math.h"
#include <limits.h> #include <limits.h>
#include <math.h>
#include <stdint.h> #include <stdint.h>
#if defined(__SSE__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1)) || defined(_M_X64) #if defined(__SSE__) || (defined(_M_IX86_FP) && (_M_IX86_FP >= 1)) || defined(_M_X64)

View file

@ -38,9 +38,10 @@
#ifndef U_MATH_H #ifndef U_MATH_H
#define U_MATH_H #define U_MATH_H
#include "c99_math.h"
#include <assert.h> #include <assert.h>
#include <float.h> #include <float.h>
#include <math.h>
#include <stdarg.h> #include <stdarg.h>
#include "bitscan.h" #include "bitscan.h"