[Mesa-dev] [RFC PATCH 03/26] mesa: add stubs for new entrypoints for ARB_texture_multisample
Ian Romanick
idr at freedesktop.org
Fri Jan 4 13:28:52 PST 2013
On 12/29/2012 04:35 AM, Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
> src/mesa/main/multisample.c | 15 +++++++++++++++
> src/mesa/main/multisample.h | 5 +++++
> src/mesa/main/teximage.c | 20 ++++++++++++++++++++
> src/mesa/main/teximage.h | 15 +++++++++++++++
> 4 files changed, 55 insertions(+)
>
> diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
> index 347e98e..0cc8eaf 100644
> --- a/src/mesa/main/multisample.c
> +++ b/src/mesa/main/multisample.c
> @@ -60,3 +60,18 @@ _mesa_init_multisample(struct gl_context *ctx)
> ctx->Multisample.SampleCoverageValue = 1.0;
> ctx->Multisample.SampleCoverageInvert = GL_FALSE;
> }
> +
> +void GLAPIENTRY
> +_mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val)
> +{
> + assert(!"Not implemented");
> + // TODO: make this work
> +}
For future reference, I think it's better to add new infrastructure
(e.g., dd_function_table::GetSampleLocation), then add the functions
that use it. It's usually fewer patches (and less review burden) that
way. As it is, you have basically a spurious patch here and another
patch later.
It's also usually good of the "add stubs" change at least introduces
parameter error checking, etc.
That said, I don't think it's necessary to change this series.
> +
> +void GLAPIENTRY
> +_mesa_SampleMaski(GLuint index, GLbitfield mask)
> +{
> + assert(!"Not implemented");
> + // TODO: make this work
> +}
> +
> diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h
> index 30726c3..9810e6a 100644
> --- a/src/mesa/main/multisample.h
> +++ b/src/mesa/main/multisample.h
> @@ -37,5 +37,10 @@ _mesa_SampleCoverage(GLclampf value, GLboolean invert);
> extern void
> _mesa_init_multisample(struct gl_context *ctx);
>
> +extern void GLAPIENTRY
> +_mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat* val);
> +
> +extern void GLAPIENTRY
> +_mesa_SampleMaski(GLuint index, GLbitfield mask);
>
Why are these functions listed in two header files (here and teximage.h
below)?
> #endif
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 7a0d944..078ac71 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -3941,3 +3941,23 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
> }
> _mesa_unlock_texture(ctx, texObj);
> }
> +
> +/** GL_ARB_texture_multisample */
> +
> +void GLAPIENTRY
> +_mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
> + GLint internalformat, GLsizei width, GLsizei height,
> + GLboolean fixedsamplelocations)
> +{
> + assert(!"Not implemented");
> + /* allocate a single 2d multisample texture */
> +}
> +
> +void GLAPIENTRY
> +_mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
> + GLint internalformat, GLsizei width, GLsizei height,
> + GLsizei depth, GLboolean fixedsamplelocations)
> +{
> + assert(!"Not implemented");
> + /* allocate an array of 2d multisample textures */
> +}
> diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
> index 65e9333..b648aef 100644
> --- a/src/mesa/main/teximage.h
> +++ b/src/mesa/main/teximage.h
> @@ -289,6 +289,21 @@ _mesa_CompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset,
> extern void GLAPIENTRY
> _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer);
>
> +extern void GLAPIENTRY
> +_mesa_TexImage2DMultisample(GLenum target, GLsizei samples,
> + GLint internalformat, GLsizei width, GLsizei height,
> + GLboolean fixedsamplelocations);
> +
> +extern void GLAPIENTRY
> +_mesa_TexImage3DMultisample(GLenum target, GLsizei samples,
> + GLint internalformat, GLsizei width, GLsizei height,
> + GLsizei depth, GLboolean fixedsamplelocations);
> +
> +extern void GLAPIENTRY
> +_mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val);
> +
> +extern void GLAPIENTRY
> +_mesa_SampleMaski(GLuint index, GLbitfield mask);
>
> /*@}*/
>
>
More information about the mesa-dev
mailing list