Add glGetFloatv and glSamplerParameterf to GrGLInterface.

Bug: skia:13036
Change-Id: Ie15e0c2b0ada468b82bced818eec67c32d70126b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/522100
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
Brian Salomon 2022-03-18 10:36:29 -04:00 committed by SkCQ
parent a29854ca73
commit 171450a1a0
7 changed files with 30 additions and 3 deletions

View File

@ -2,11 +2,19 @@ Skia Graphics Release Notes
This file includes a list of high level updates for each milestone release. This file includes a list of high level updates for each milestone release.
Milestone 102
-------------
* Add glGetFloatv and glSamplerParameterf to GrGLInterface.
* * *
Milestone 101 Milestone 101
------------- -------------
* Add maxSurfaceSampleCountForColorType(SkColorType ct) in GrContextThreadSafeProxy * Add maxSurfaceSampleCountForColorType(SkColorType ct) in GrContextThreadSafeProxy
* Enums SkAlphaType and SkColorType are broken out into their own header files in include/core/ * Enums SkAlphaType and SkColorType are broken out into their own header files in include/core/
* * *
Milestone 100 Milestone 100
------------- -------------
* Skia now requires C++17 and the corresponding standard library (or newer). * Skia now requires C++17 and the corresponding standard library (or newer).

View File

@ -96,6 +96,7 @@ using GrGLGenVertexArraysFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLsizei n, GrGLuint
using GrGLGetBufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params); using GrGLGetBufferParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum pname, GrGLint* params);
using GrGLGetErrorFn = GrGLenum GR_GL_FUNCTION_TYPE(); using GrGLGetErrorFn = GrGLenum GR_GL_FUNCTION_TYPE();
using GrGLGetFramebufferAttachmentParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum pname, GrGLint* params); using GrGLGetFramebufferAttachmentParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum attachment, GrGLenum pname, GrGLint* params);
using GrGLGetFloatvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLfloat* params);
using GrGLGetIntegervFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint* params); using GrGLGetIntegervFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLint* params);
using GrGLGetMultisamplefvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLuint index, GrGLfloat* val); using GrGLGetMultisamplefvFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum pname, GrGLuint index, GrGLfloat* val);
using GrGLGetProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, GrGLenum* binaryFormat, void* binary); using GrGLGetProgramBinaryFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint program, GrGLsizei bufsize, GrGLsizei* length, GrGLenum* binaryFormat, void* binary);
@ -142,7 +143,8 @@ using GrGLReadPixelsFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGL
using GrGLRenderbufferStorageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height); using GrGLRenderbufferStorageFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
using GrGLRenderbufferStorageMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height); using GrGLRenderbufferStorageMultisampleFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLenum target, GrGLsizei samples, GrGLenum internalformat, GrGLsizei width, GrGLsizei height);
using GrGLResolveMultisampleFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE(); using GrGLResolveMultisampleFramebufferFn = GrGLvoid GR_GL_FUNCTION_TYPE();
using GrGLSamplerParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, GrGLint params); using GrGLSamplerParameterfFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, GrGLfloat param);
using GrGLSamplerParameteriFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, GrGLint param);
using GrGLSamplerParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, const GrGLint* params); using GrGLSamplerParameterivFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLuint sampler, GrGLenum pname, const GrGLint* params);
using GrGLScissorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height); using GrGLScissorFn = GrGLvoid GR_GL_FUNCTION_TYPE(GrGLint x, GrGLint y, GrGLsizei width, GrGLsizei height);
// GL_CHROMIUM_bind_uniform_location // GL_CHROMIUM_bind_uniform_location

View File

@ -170,6 +170,7 @@ public:
GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv; GrGLFunction<GrGLGetBufferParameterivFn> fGetBufferParameteriv;
GrGLFunction<GrGLGetErrorFn> fGetError; GrGLFunction<GrGLGetErrorFn> fGetError;
GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv; GrGLFunction<GrGLGetFramebufferAttachmentParameterivFn> fGetFramebufferAttachmentParameteriv;
GrGLFunction<GrGLGetFloatvFn> fGetFloatv;
GrGLFunction<GrGLGetIntegervFn> fGetIntegerv; GrGLFunction<GrGLGetIntegervFn> fGetIntegerv;
GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv; GrGLFunction<GrGLGetMultisamplefvFn> fGetMultisamplefv;
GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary; GrGLFunction<GrGLGetProgramBinaryFn> fGetProgramBinary;
@ -248,6 +249,7 @@ public:
GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation; GrGLFunction<GrGLBindUniformLocationFn> fBindUniformLocation;
GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer; GrGLFunction<GrGLResolveMultisampleFramebufferFn> fResolveMultisampleFramebuffer;
GrGLFunction<GrGLSamplerParameterfFn> fSamplerParameterf;
GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri; GrGLFunction<GrGLSamplerParameteriFn> fSamplerParameteri;
GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv; GrGLFunction<GrGLSamplerParameterivFn> fSamplerParameteriv;
GrGLFunction<GrGLScissorFn> fScissor; GrGLFunction<GrGLScissorFn> fScissor;

View File

@ -91,6 +91,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc
GET_PROC(GenTextures); GET_PROC(GenTextures);
GET_PROC(GetBufferParameteriv); GET_PROC(GetBufferParameteriv);
GET_PROC(GetError); GET_PROC(GetError);
GET_PROC(GetFloatv);
GET_PROC(GetIntegerv); GET_PROC(GetIntegerv);
GET_PROC(GetProgramInfoLog); GET_PROC(GetProgramInfoLog);
GET_PROC(GetProgramiv); GET_PROC(GetProgramiv);
@ -425,6 +426,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLESInterface(void *ctx, GrGLGetProc
GET_PROC(BindSampler); GET_PROC(BindSampler);
GET_PROC(DeleteSamplers); GET_PROC(DeleteSamplers);
GET_PROC(GenSamplers); GET_PROC(GenSamplers);
GET_PROC(SamplerParameterf);
GET_PROC(SamplerParameteri); GET_PROC(SamplerParameteri);
GET_PROC(SamplerParameteriv); GET_PROC(SamplerParameteriv);
} }

View File

@ -94,6 +94,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc g
GET_PROC(GenTextures); GET_PROC(GenTextures);
GET_PROC(GetBufferParameteriv); GET_PROC(GetBufferParameteriv);
GET_PROC(GetError); GET_PROC(GetError);
GET_PROC(GetFloatv);
GET_PROC(GetIntegerv); GET_PROC(GetIntegerv);
GET_PROC(GetProgramInfoLog); GET_PROC(GetProgramInfoLog);
GET_PROC(GetProgramiv); GET_PROC(GetProgramiv);
@ -421,12 +422,14 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledGLInterface(void *ctx, GrGLGetProc g
GET_PROC(BindSampler); GET_PROC(BindSampler);
GET_PROC(DeleteSamplers); GET_PROC(DeleteSamplers);
GET_PROC(GenSamplers); GET_PROC(GenSamplers);
GET_PROC(SamplerParameterf);
GET_PROC(SamplerParameteri); GET_PROC(SamplerParameteri);
GET_PROC(SamplerParameteriv); GET_PROC(SamplerParameteriv);
} else if (extensions.has("GL_ARB_sampler_objects")) { } else if (extensions.has("GL_ARB_sampler_objects")) {
GET_PROC(BindSampler); GET_PROC(BindSampler);
GET_PROC(DeleteSamplers); GET_PROC(DeleteSamplers);
GET_PROC(GenSamplers); GET_PROC(GenSamplers);
GET_PROC(SamplerParameterf);
GET_PROC(SamplerParameteri); GET_PROC(SamplerParameteri);
GET_PROC(SamplerParameteriv); GET_PROC(SamplerParameteriv);
} }

View File

@ -98,6 +98,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetPro
GET_PROC(GenTextures); GET_PROC(GenTextures);
GET_PROC(GetBufferParameteriv); GET_PROC(GetBufferParameteriv);
GET_PROC(GetError); GET_PROC(GetError);
GET_PROC(GetFloatv);
GET_PROC(GetIntegerv); GET_PROC(GetIntegerv);
GET_PROC(GetProgramInfoLog); GET_PROC(GetProgramInfoLog);
GET_PROC(GetProgramiv); GET_PROC(GetProgramiv);
@ -239,6 +240,7 @@ sk_sp<const GrGLInterface> GrGLMakeAssembledWebGLInterface(void *ctx, GrGLGetPro
GET_PROC(BindSampler); GET_PROC(BindSampler);
GET_PROC(DeleteSamplers); GET_PROC(DeleteSamplers);
GET_PROC(GenSamplers); GET_PROC(GenSamplers);
GET_PROC(SamplerParameterf);
GET_PROC(SamplerParameteri); GET_PROC(SamplerParameteri);
GET_PROC(SamplerParameteriv); GET_PROC(SamplerParameteriv);
} }

View File

@ -32,7 +32,7 @@
"EnableVertexAttribArray", "Finish", "Flush", "EnableVertexAttribArray", "Finish", "Flush",
"FrontFace", "GenBuffers", "FrontFace", "GenBuffers",
"GenTextures", "GetBufferParameteriv", "GetError", "GenTextures", "GetBufferParameteriv", "GetError",
"GetIntegerv", "GetProgramInfoLog", "GetFloatv", "GetIntegerv", "GetProgramInfoLog",
"GetProgramiv", "GetShaderInfoLog", "GetProgramiv", "GetShaderInfoLog",
"GetShaderiv", "GetString", "GetShaderiv", "GetString",
"GetUniformLocation", "IsTexture", "LineWidth", "LinkProgram", "PixelStorei", "GetUniformLocation", "IsTexture", "LineWidth", "LinkProgram", "PixelStorei",
@ -46,6 +46,11 @@
"VertexAttrib2fv", "VertexAttrib3fv", "VertexAttrib4fv", "VertexAttribPointer", "VertexAttrib2fv", "VertexAttrib3fv", "VertexAttrib4fv", "VertexAttribPointer",
"Viewport", "Viewport",
], ],
// TODO: Remove 'optional' once Chrome sets this function in the interface.
"optional": [
"GetFloatv",
]
}, },
{ // GL exclusive core functions { // GL exclusive core functions
"GL": [{"ext": "<core>"}], "GL": [{"ext": "<core>"}],
@ -610,8 +615,11 @@
"functions": [ "functions": [
"BindSampler", "DeleteSamplers", "GenSamplers", "BindSampler", "DeleteSamplers", "GenSamplers",
"SamplerParameteri", "SamplerParameteriv", "SamplerParameterf", "SamplerParameteri", "SamplerParameteriv",
], ],
// TODO: Remove 'optional' once Chrome sets this function in the interface.
"optional": ["SamplerParameterf"]
}, },
{ {