[Mesa-dev] [PATCH 07/10] i965: Claim to support rendering to integer FBOs.
Kenneth Graunke
kenneth at whitecape.org
Tue Nov 8 19:33:07 PST 2011
On 11/04/2011 03:01 PM, Eric Anholt wrote:
> We're missing support for the software paths still, but basic
> rendering is working.
Yeah, we'll need to finish killing the software paths. Glad to see GPU
rendering working!
Comments below.
> ---
> src/mesa/drivers/dri/intel/intel_span.c | 7 ++++++-
> src/mesa/drivers/dri/intel/intel_tex_format.c | 6 ++++++
> 2 files changed, 12 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
> index 604962d..e66b0f6 100644
> --- a/src/mesa/drivers/dri/intel/intel_span.c
> +++ b/src/mesa/drivers/dri/intel/intel_span.c
> @@ -421,7 +421,12 @@ static span_init_func intel_span_init_funcs[MESA_FORMAT_COUNT] =
> bool
> intel_span_supports_format(gl_format format)
> {
> - return intel_span_init_funcs[format] != NULL;
> + /* Rendering to/from integer textures will be done using MapRenderbuffer,
> + * rather than coding up new paths through GetRow/PutRow(), so claim support
> + * for those formats in here for now.
> + */
> + return (intel_span_init_funcs[format] != NULL ||
> + _mesa_is_format_integer_color(format));
> }
>
> /**
> diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
> index 6890a69..caef5b2 100644
> --- a/src/mesa/drivers/dri/intel/intel_tex_format.c
> +++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
> @@ -9,6 +9,12 @@
> GLenum
> intel_mesa_format_to_rb_datatype(gl_format format)
> {
> + /* These formats won't be going through the GetRow/PutRow() interfaces, so
> + * just return a type.
> + */
> + if (_mesa_is_format_integer_color(format))
> + return GL_UNSIGNED_INT;
> +
> switch (format) {
> case MESA_FORMAT_ARGB8888:
> case MESA_FORMAT_XRGB8888:
The key piece of missing knowledge is that intel_renderbuffer::DataType
is only used for spans rendering. Assuming that's really the case, this
patch is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
More information about the mesa-dev
mailing list