Bug 1627368 - allow requesting trilinear filtering in SWGL. r=jimb

Differential Revision: https://phabricator.services.mozilla.com/D69897

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Lee Salzman 2020-04-07 20:10:23 +00:00
Родитель 2f35997cd0
Коммит 9bc70fa0d9
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -1379,6 +1379,10 @@ void TexImage3D(GLenum target, GLint level, GLint internal_format,
TexSubImage3D(target, 0, 0, 0, 0, width, height, depth, format, ty, data); TexSubImage3D(target, 0, 0, 0, 0, width, height, depth, format, ty, data);
} }
void GenerateMipmap(GLenum target) {
// TODO: support mipmaps
}
void TexParameteri(GLenum target, GLenum pname, GLint param) { void TexParameteri(GLenum target, GLenum pname, GLint param) {
Texture& t = ctx->textures[ctx->get_binding(target)]; Texture& t = ctx->textures[ctx->get_binding(target)];
switch (pname) { switch (pname) {
@ -1389,11 +1393,9 @@ void TexParameteri(GLenum target, GLenum pname, GLint param) {
assert(param == GL_CLAMP_TO_EDGE); assert(param == GL_CLAMP_TO_EDGE);
break; break;
case GL_TEXTURE_MIN_FILTER: case GL_TEXTURE_MIN_FILTER:
assert(param == GL_NEAREST || param == GL_LINEAR);
t.min_filter = param; t.min_filter = param;
break; break;
case GL_TEXTURE_MAG_FILTER: case GL_TEXTURE_MAG_FILTER:
assert(param == GL_NEAREST || param == GL_LINEAR);
t.mag_filter = param; t.mag_filter = param;
break; break;
default: default:

Просмотреть файл

@ -121,6 +121,7 @@ extern "C" {
ty: GLenum, ty: GLenum,
data: *const c_void, data: *const c_void,
); );
fn GenerateMipmap(target: GLenum);
fn GetUniformLocation(program: GLuint, name: *const GLchar) -> GLint; fn GetUniformLocation(program: GLuint, name: *const GLchar) -> GLint;
fn BindAttribLocation(program: GLuint, index: GLuint, name: *const GLchar); fn BindAttribLocation(program: GLuint, index: GLuint, name: *const GLchar);
fn GetAttribLocation(program: GLuint, name: *const GLchar) -> GLint; fn GetAttribLocation(program: GLuint, name: *const GLchar) -> GLint;
@ -2055,7 +2056,9 @@ impl Gl for Context {
} }
fn generate_mipmap(&self, target: GLenum) { fn generate_mipmap(&self, target: GLenum) {
panic!(); unsafe {
GenerateMipmap(target);
}
} }
fn insert_event_marker_ext(&self, message: &str) { fn insert_event_marker_ext(&self, message: &str) {