From 552be8c34e5dbe2725ee1604947f3bb570c0a9db Mon Sep 17 00:00:00 2001 From: chyyran Date: Sat, 3 Feb 2024 02:52:48 -0500 Subject: [PATCH] rt(gl): remove unnecessary unstable features polyfill strict_provenance with sptr --- Cargo.lock | 7 +++++++ librashader-runtime-gl/Cargo.toml | 2 ++ librashader-runtime-gl/src/gl/gl3/draw_quad.rs | 4 ++-- librashader-runtime-gl/src/lib.rs | 1 - 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1dfbaf5..f1de69e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1353,6 +1353,7 @@ dependencies = [ "librashader-spirv-cross", "rayon", "rustc-hash", + "sptr", "thiserror", ] @@ -2180,6 +2181,12 @@ dependencies = [ "cmake", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + [[package]] name = "strsim" version = "0.10.0" diff --git a/librashader-runtime-gl/Cargo.toml b/librashader-runtime-gl/Cargo.toml index 0acc477..9718fe6 100644 --- a/librashader-runtime-gl/Cargo.toml +++ b/librashader-runtime-gl/Cargo.toml @@ -26,6 +26,8 @@ bytemuck = "1.12.3" thiserror = "1.0.37" rayon = "1.6.1" +sptr = "0.3" + [dev-dependencies] glfw = "0.47.0" diff --git a/librashader-runtime-gl/src/gl/gl3/draw_quad.rs b/librashader-runtime-gl/src/gl/gl3/draw_quad.rs index ce02b16..a7259fb 100644 --- a/librashader-runtime-gl/src/gl/gl3/draw_quad.rs +++ b/librashader-runtime-gl/src/gl/gl3/draw_quad.rs @@ -52,7 +52,7 @@ impl DrawQuad for Gl3DrawQuad { gl::FLOAT, gl::FALSE, (4 * std::mem::size_of::()) as GLsizei, - std::ptr::invalid(0), + sptr::invalid(0), ); gl::VertexAttribPointer( 1, @@ -60,7 +60,7 @@ impl DrawQuad for Gl3DrawQuad { gl::FLOAT, gl::FALSE, (4 * std::mem::size_of::()) as GLsizei, - std::ptr::invalid(2 * std::mem::size_of::()), + sptr::invalid(2 * std::mem::size_of::()), ); } } diff --git a/librashader-runtime-gl/src/lib.rs b/librashader-runtime-gl/src/lib.rs index 7064f40..5bba053 100644 --- a/librashader-runtime-gl/src/lib.rs +++ b/librashader-runtime-gl/src/lib.rs @@ -3,7 +3,6 @@ //! This crate should not be used directly. //! See [`librashader::runtime::gl`](https://docs.rs/librashader/latest/librashader/runtime/gl/index.html) instead. #![deny(unsafe_op_in_unsafe_fn)] -#![feature(strict_provenance)] #![feature(let_chains)] #![feature(type_alias_impl_trait)]