зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1694909 - Part 10 - Remove ImageBufferKind::Texture2DArray. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D106508
This commit is contained in:
Родитель
fe203350ef
Коммит
ab19851395
|
@ -154,7 +154,6 @@ fn depth_target_size_in_bytes(dimensions: &DeviceIntSize) -> usize {
|
|||
pub fn get_gl_target(target: ImageBufferKind) -> gl::GLuint {
|
||||
match target {
|
||||
ImageBufferKind::Texture2D => gl::TEXTURE_2D,
|
||||
ImageBufferKind::Texture2DArray => gl::TEXTURE_2D_ARRAY,
|
||||
ImageBufferKind::TextureRect => gl::TEXTURE_RECTANGLE,
|
||||
ImageBufferKind::TextureExternal => gl::TEXTURE_EXTERNAL_OES,
|
||||
}
|
||||
|
|
|
@ -5867,7 +5867,7 @@ impl Renderer {
|
|||
for (id, texture) in renderer.textures {
|
||||
info!("\t{}", texture.data);
|
||||
let target = if texture.is_array {
|
||||
ImageBufferKind::Texture2DArray
|
||||
panic!("Texture arrays aren't supported");
|
||||
} else {
|
||||
ImageBufferKind::Texture2D
|
||||
};
|
||||
|
|
|
@ -25,7 +25,6 @@ use webrender_build::shader::{ShaderFeatures, ShaderFeatureFlags, get_shader_fea
|
|||
pub(crate) fn get_feature_string(kind: ImageBufferKind) -> &'static str {
|
||||
match kind {
|
||||
ImageBufferKind::Texture2D => "TEXTURE_2D",
|
||||
ImageBufferKind::Texture2DArray => "TEXTURE_2D_ARRAY",
|
||||
ImageBufferKind::TextureRect => "TEXTURE_RECT",
|
||||
ImageBufferKind::TextureExternal => "TEXTURE_EXTERNAL",
|
||||
}
|
||||
|
@ -34,7 +33,6 @@ pub(crate) fn get_feature_string(kind: ImageBufferKind) -> &'static str {
|
|||
fn has_platform_support(kind: ImageBufferKind, gl_type: &GlType) -> bool {
|
||||
match (kind, gl_type) {
|
||||
(ImageBufferKind::Texture2D, _) => true,
|
||||
(ImageBufferKind::Texture2DArray, _) => true,
|
||||
(ImageBufferKind::TextureRect, &GlType::Gles) => false,
|
||||
(ImageBufferKind::TextureRect, &GlType::Gl) => true,
|
||||
(ImageBufferKind::TextureExternal, &GlType::Gles) => true,
|
||||
|
@ -42,11 +40,10 @@ fn has_platform_support(kind: ImageBufferKind, gl_type: &GlType) -> bool {
|
|||
}
|
||||
}
|
||||
|
||||
pub const IMAGE_BUFFER_KINDS: [ImageBufferKind; 4] = [
|
||||
pub const IMAGE_BUFFER_KINDS: [ImageBufferKind; 3] = [
|
||||
ImageBufferKind::Texture2D,
|
||||
ImageBufferKind::TextureRect,
|
||||
ImageBufferKind::TextureExternal,
|
||||
ImageBufferKind::Texture2DArray,
|
||||
];
|
||||
|
||||
const ADVANCED_BLEND_FEATURE: &str = "ADVANCED_BLEND";
|
||||
|
|
|
@ -118,10 +118,6 @@ pub enum ImageBufferKind {
|
|||
/// understand, particularly YUV. See
|
||||
/// https://www.khronos.org/registry/OpenGL/extensions/OES/OES_EGL_image_external.txt
|
||||
TextureExternal = 2,
|
||||
/// Array texture. This maps to GL_TEXTURE_2D_ARRAY in OpenGL. See
|
||||
/// https://www.khronos.org/opengl/wiki/Array_Texture for background
|
||||
/// on Array textures.
|
||||
Texture2DArray = 3,
|
||||
}
|
||||
|
||||
/// Storage format identifier for externally-managed images.
|
||||
|
|
|
@ -757,7 +757,6 @@ impl YamlFrameReader {
|
|||
let external_target = match item["external-target"].as_str() {
|
||||
Some(ref s) => match &s[..] {
|
||||
"2d" => ImageBufferKind::Texture2D,
|
||||
"array" => ImageBufferKind::Texture2DArray,
|
||||
"rect" => ImageBufferKind::TextureRect,
|
||||
_ => panic!("Unsupported external texture target."),
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче