Bug 1828248 - Update gleam to 0.15. r=gfx-reviewers,supply-chain-reviewers,jrmuizel

This provides us with QCOM_tiled_rendering, which will be used in the
next patch in this series.

Differential Revision: https://phabricator.services.mozilla.com/D176153
This commit is contained in:
Jamie Nicol 2023-04-24 16:37:06 +00:00
parent 9fcf0fb644
commit d62fe2d0aa
17 changed files with 146 additions and 18 deletions

4
Cargo.lock generated
View File

@ -2191,9 +2191,9 @@ dependencies = [
[[package]]
name = "gleam"
version = "0.13.1"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "992c40589d382354958af7c60910026ed4cc3c58751355db21a4c2fbef15727a"
checksum = "0173481f2bb6e809bf4985de2e86c83876d84d2805830e3301cd37355e897f0f"
dependencies = [
"gl_generator",
]

View File

@ -11,7 +11,7 @@ num_cpus = "1.7.0"
tracy-rs = "0.1"
euclid = { version = "0.22.5", features = ["serde"] }
app_units = "0.7"
gleam = "0.13.1"
gleam = "0.15"
log = "0.4"
nsstring = { path = "../../xpcom/rust/nsstring" }
bincode = "1.0"

4
gfx/wr/Cargo.lock generated
View File

@ -931,9 +931,9 @@ dependencies = [
[[package]]
name = "gleam"
version = "0.13.1"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "992c40589d382354958af7c60910026ed4cc3c58751355db21a4c2fbef15727a"
checksum = "0173481f2bb6e809bf4985de2e86c83876d84d2805830e3301cd37355e897f0f"
dependencies = [
"gl_generator 0.14.0",
]

View File

@ -7,7 +7,7 @@ license = "MPL-2.0"
[dependencies]
webrender = { path = "../../webrender" }
gleam = "0.13.1"
gleam = "0.15"
[target.'cfg(windows)'.dependencies]
compositor-windows = { path = "../compositor-windows" }

View File

@ -57,7 +57,7 @@ debug = ["webrender/capture", "webrender/profiler"]
app_units = "0.7"
env_logger = { version = "0.10", default_features = false }
euclid = "0.22"
gleam = "0.13"
gleam = "0.15"
glutin = "0.28"
rayon = "1"
webrender = { path = "../webrender" }

View File

@ -12,4 +12,4 @@ glsl-to-cxx = { path = "../glsl-to-cxx" }
webrender_build = { path = "../webrender_build" }
[dependencies]
gleam = "0.13.1"
gleam = "0.15"

View File

@ -964,6 +964,16 @@ impl Gl for Context {
}
}
fn bind_vertex_buffer(
&self,
binding_index: GLuint,
buffer: GLuint,
offset: GLintptr,
stride: GLint,
) {
unimplemented!("Not supported by SWGL");
}
fn bind_texture(&self, target: GLenum, texture: GLuint) {
//panic!();
unsafe {
@ -1405,6 +1415,10 @@ impl Gl for Context {
panic!();
}
fn vertex_attrib_binding(&self, attrib_index: GLuint, binding_index: GLuint) {
unimplemented!("Not supported by SWGL");
}
fn vertex_attrib_pointer_f32(
&self,
index: GLuint,
@ -1469,6 +1483,31 @@ impl Gl for Context {
}
}
fn vertex_attrib_format(
&self,
attrib_index: GLuint,
size: GLint,
type_: GLenum,
normalized: bool,
relative_offset: GLuint,
) {
unimplemented!("Not supported by SWGL");
}
fn vertex_attrib_i_format(
&self,
attrib_index: GLuint,
size: GLint,
type_: GLenum,
relative_offset: GLuint,
) {
unimplemented!("Not supported by SWGL");
}
fn vertex_binding_divisor(&self, binding_index: GLuint, divisor: GLuint) {
unimplemented!("Not supported by SWGL");
}
fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
debug!("viewport {} {} {} {}", x, y, width, height);
//panic!();
@ -2285,6 +2324,21 @@ impl Gl for Context {
fn flush_mapped_buffer_range(&self, target: GLenum, offset: GLintptr, length: GLsizeiptr) {
unimplemented!("Not supported by SWGL");
}
fn start_tiling_qcom(
&self,
x: GLuint,
y: GLuint,
width: GLuint,
height: GLuint,
preserve_mask: GLbitfield,
) {
unimplemented!("Not supported by SWGL");
}
fn end_tiling_qcom(&self, preserve_mask: GLbitfield) {
unimplemented!("Not supported by SWGL");
}
}
/// A resource that is intended for sharing between threads.

View File

@ -32,7 +32,7 @@ bitflags = "1.2"
byteorder = "1.0"
euclid = { version = "0.22.0", features = ["serde"] }
fxhash = "0.2.1"
gleam = "0.13.1"
gleam = "0.15.0"
lazy_static = "1"
log = "0.4"
malloc_size_of_derive = "0.1"

View File

@ -32,7 +32,7 @@ serde = { optional = true, version = "1.0", features = ["serde_derive"] }
[dev-dependencies]
env_logger = { version = "0.10", default_features = false }
euclid = "0.22"
gleam = "0.13"
gleam = "0.15"
glutin = "0.28"
rayon = "1"
winit = "0.26"

View File

@ -14,7 +14,7 @@ path = "src/main.rs"
[dependencies]
base64 = "0.13"
env_logger = { version = "0.10", optional = true, default_features = false }
gleam = "0.13"
gleam = "0.15"
glutin = "0.28"
clap = { version = "3.1", features = ["yaml"] }
glsl-lang = { version = "0.2", features = ["lexer-v2-full"] }

View File

@ -1109,6 +1109,11 @@ who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"
delta = "0.2.7 -> 0.2.8"
[[audits.gleam]]
who = "Jamie Nicol <jnicol@mozilla.com>"
criteria = "safe-to-deploy"
delta = "0.13.1 -> 0.15.0"
[[audits.glob]]
who = "Mike Hommey <mh+mozilla@glandium.org>"
criteria = "safe-to-deploy"

View File

@ -1 +1 @@
{"files":{"COPYING":"ec82b96487e9e778ee610c7ab245162464782cfa1f555c2299333f8dbe5c036a","Cargo.toml":"aafaa93ede79cc66087ed617d13a1aebc4fe09fc7bf4672d6b751163e41f3eda","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","README.md":"1acb12040be43a3582d5897f11870b3ffdcd7ce0f4f32de158175bb6b33ec0b7","build.rs":"de46062da47ddfc16a7be97d9c026df044af0c25a49035214c4e88aa4e0e5cbf","rustfmt.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/gl.rs":"7e20ad9a3cc2db1e451bb0a52c8cd3687cf1a1c495954f999aa1e299e3d54250","src/gl_fns.rs":"01940aa48c204e8f95ee025e0c386f10f2dcd43cde4798f91372d2870fe3cf53","src/gles_fns.rs":"74951f6ae58fb1c2b51129c018df74845e367c7f08bc1ff7873007bb06e80c60","src/lib.rs":"16610c19b45a3f26d56b379a3591aa2e4fc9477e7bd88f86b31c6ea32e834861"},"package":"992c40589d382354958af7c60910026ed4cc3c58751355db21a4c2fbef15727a"}
{"files":{"COPYING":"ec82b96487e9e778ee610c7ab245162464782cfa1f555c2299333f8dbe5c036a","Cargo.toml":"6dce42dfad850b93a2d4a2d29ab4c8de9c7bd783e6870ceec5fd8dccb960e50f","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3","README.md":"1acb12040be43a3582d5897f11870b3ffdcd7ce0f4f32de158175bb6b33ec0b7","build.rs":"cf4ed31d33c2dcc3cb16648ce60c6ac69a7959fbd2491aa3565237f601a1ef18","rustfmt.toml":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855","src/gl.rs":"c10739f5382209a4a4715a9e38b3a263f750f52a7b5131c31683f0fd221e8d00","src/gl_fns.rs":"03c0232de8e1ffb8db3b4669cefe00f8e8c4ba49504276b0b84c88804cc01d13","src/gles_fns.rs":"7101fd4dbc354c2b375a8a525623d29ee5ac0e6cd13bf78c93a264fc50c0b589","src/lib.rs":"16610c19b45a3f26d56b379a3591aa2e4fc9477e7bd88f86b31c6ea32e834861"},"package":"0173481f2bb6e809bf4985de2e86c83876d84d2805830e3301cd37355e897f0f"}

View File

@ -3,21 +3,22 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# 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 believe there's an error in this file please file an
# issue against the rust-lang/cargo repository. If you're
# editing this file be aware that the upstream Cargo.toml
# will likely look very different (and much more reasonable)
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.
[package]
name = "gleam"
version = "0.13.1"
version = "0.15.0"
authors = ["The Servo Project Developers"]
build = "build.rs"
description = "Generated OpenGL bindings and wrapper for Servo."
documentation = "https://doc.servo.org/gleam/"
readme = "README.md"
license = "Apache-2.0/MIT"
repository = "https://github.com/servo/gleam"
[build-dependencies.gl_generator]
version = "0.14"

View File

@ -25,6 +25,7 @@ fn main() {
"GL_ARB_invalidate_subdata",
"GL_ARB_texture_rectangle",
"GL_ARB_texture_storage",
"GL_ARB_vertex_attrib_binding",
"GL_EXT_debug_marker",
"GL_EXT_texture_filter_anisotropic",
"GL_KHR_debug",
@ -65,6 +66,7 @@ fn main() {
"GL_KHR_blend_equation_advanced",
"GL_KHR_blend_equation_advanced_coherent",
"GL_ANGLE_copy_texture_3d",
"GL_QCOM_tiled_rendering",
];
let gles_reg = Registry::new(
Api::Gles2,

View File

@ -241,6 +241,7 @@ declare_gl_apis! {
fn bind_renderbuffer(&self, target: GLenum, renderbuffer: GLuint);
fn bind_framebuffer(&self, target: GLenum, framebuffer: GLuint);
fn bind_texture(&self, target: GLenum, texture: GLuint);
fn bind_vertex_buffer(&self, binding_index: GLuint, buffer: GLuint, offset: GLintptr, stride: GLint);
fn draw_buffers(&self, bufs: &[GLenum]);
fn tex_image_2d(
&self,
@ -477,6 +478,7 @@ declare_gl_apis! {
filter: GLenum,
);
fn vertex_attrib_4f(&self, index: GLuint, x: GLfloat, y: GLfloat, z: GLfloat, w: GLfloat);
fn vertex_attrib_binding(&self, attrib_index: GLuint, binding_index: GLuint);
fn vertex_attrib_pointer_f32(
&self,
index: GLuint,
@ -503,6 +505,9 @@ declare_gl_apis! {
offset: GLuint,
);
fn vertex_attrib_divisor(&self, index: GLuint, divisor: GLuint);
fn vertex_attrib_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, normalized: bool, relative_offset: GLuint);
fn vertex_attrib_i_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, relative_offset: GLuint);
fn vertex_binding_divisor(&self, binding_index: GLuint, divisor: GLuint);
fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei);
fn scissor(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei);
fn line_width(&self, width: GLfloat);
@ -756,6 +761,9 @@ declare_gl_apis! {
);
fn flush_mapped_buffer_range(&self, target: GLenum, offset: GLintptr, length: GLsizeiptr);
fn start_tiling_qcom(&self, x: GLuint, y: GLuint, width: GLuint, height: GLuint, preserve_mask: GLbitfield);
fn end_tiling_qcom(&self, preserve_mask: GLbitfield);
}
//#[deprecated(since = "0.6.11", note = "use ErrorReactingGl instead")]

View File

@ -512,6 +512,10 @@ impl Gl for GlFns {
}
}
fn bind_vertex_buffer(&self, binding_index: GLuint, buffer: GLuint, offset: GLintptr, stride: GLint) {
unsafe { self.ffi_gl_.BindVertexBuffer(binding_index, buffer, offset, stride) }
}
fn draw_buffers(&self, bufs: &[GLenum]) {
unsafe {
self.ffi_gl_
@ -1074,6 +1078,10 @@ impl Gl for GlFns {
unsafe { self.ffi_gl_.VertexAttrib4f(index, x, y, z, w) }
}
fn vertex_attrib_binding(&self, attrib_index: GLuint, binding_index: GLuint) {
unsafe { self.ffi_gl_.VertexAttribBinding(attrib_index, binding_index) }
}
fn vertex_attrib_pointer_f32(
&self,
index: GLuint,
@ -1133,6 +1141,18 @@ impl Gl for GlFns {
unsafe { self.ffi_gl_.VertexAttribDivisor(index, divisor) }
}
fn vertex_attrib_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, normalized: bool, relative_offset: GLuint) {
unsafe { self.ffi_gl_.VertexAttribFormat(attrib_index, size, type_, normalized as GLboolean, relative_offset) }
}
fn vertex_attrib_i_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, relative_offset: GLuint) {
unsafe { self.ffi_gl_.VertexAttribIFormat(attrib_index, size, type_, relative_offset) }
}
fn vertex_binding_divisor(&self, binding_index: GLuint, divisor: GLuint) {
unsafe { self.ffi_gl_.VertexBindingDivisor(binding_index, divisor) }
}
fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
unsafe {
self.ffi_gl_.Viewport(x, y, width, height);
@ -2264,4 +2284,10 @@ impl Gl for GlFns {
self.ffi_gl_.FlushMappedBufferRange(target, offset, length);
}
}
fn start_tiling_qcom(&self, _x: GLuint, _y: GLuint, _width: GLuint, _height: GLuint, _preserve_mask: GLbitfield) {
}
fn end_tiling_qcom(&self, _preserve_mask: GLbitfield) {
}
}

View File

@ -525,6 +525,10 @@ impl Gl for GlesFns {
}
}
fn bind_vertex_buffer(&self, binding_index: GLuint, buffer: GLuint, offset: GLintptr, stride: GLint) {
unsafe { self.ffi_gl_.BindVertexBuffer(binding_index, buffer, offset, stride) }
}
fn draw_buffers(&self, bufs: &[GLenum]) {
unsafe {
self.ffi_gl_
@ -1077,6 +1081,10 @@ impl Gl for GlesFns {
unsafe { self.ffi_gl_.VertexAttrib4f(index, x, y, z, w) }
}
fn vertex_attrib_binding(&self, attrib_index: GLuint, binding_index: GLuint) {
unsafe { self.ffi_gl_.VertexAttribBinding(attrib_index, binding_index) }
}
fn vertex_attrib_pointer_f32(
&self,
index: GLuint,
@ -1136,6 +1144,18 @@ impl Gl for GlesFns {
unsafe { self.ffi_gl_.VertexAttribDivisor(index, divisor) }
}
fn vertex_attrib_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, normalized: bool, relative_offset: GLuint) {
unsafe { self.ffi_gl_.VertexAttribFormat(attrib_index, size, type_, normalized as GLboolean, relative_offset) }
}
fn vertex_attrib_i_format(&self, attrib_index: GLuint, size: GLint, type_: GLenum, relative_offset: GLuint) {
unsafe { self.ffi_gl_.VertexAttribIFormat(attrib_index, size, type_, relative_offset) }
}
fn vertex_binding_divisor(&self, binding_index: GLuint, divisor: GLuint) {
unsafe { self.ffi_gl_.VertexBindingDivisor(binding_index, divisor) }
}
fn viewport(&self, x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
unsafe {
self.ffi_gl_.Viewport(x, y, width, height);
@ -2266,4 +2286,16 @@ impl Gl for GlesFns {
self.ffi_gl_.FlushMappedBufferRange(target, offset, length);
}
}
fn start_tiling_qcom(&self, x: GLuint, y: GLuint, width: GLuint, height: GLuint, preserve_mask: GLbitfield) {
unsafe {
self.ffi_gl_.StartTilingQCOM(x, y, width, height, preserve_mask);
}
}
fn end_tiling_qcom(&self, preserve_mask: GLbitfield) {
unsafe {
self.ffi_gl_.EndTilingQCOM(preserve_mask);
}
}
}