[Mesa-dev] [v4 PATCH 06/10] i965: Use _mesa_geometry_ functions appropriately
Ilia Mirkin
imirkin at alum.mit.edu
Wed May 27 04:06:31 PDT 2015
Just some trivia:
On Wed, May 27, 2015 at 5:49 AM, Kevin Rogovin <kevin.rogovin at intel.com> wrote:
> Change references to gl_framebuffer::Width, Height, MaxNumLayers
> and Visual::samples to use the _mesa_geometry_ convenience functions
Both here and in the subject, I presume you meant _mesa_geometric_* ?
> for those places where the geometry of the gl_framebuffer is needed
> (in contrast to the geometry of the intersection of the attachments
> of the gl_framebuffer).
>
> This patch is to pave the way to enable GL_ARB_framebuffer_no_attachments
> on Gen7 and higher in i965.
>
> v2:
> Remove changes that would only be active in Gen4/5.
> Type and casting changes for consistency and readability.
>
> v3:
> Updates for rebase against master.
>
> v4:
> Use unsigned int inplace of int and remove casts to int.
> Formatting fixes.
>
> Signed-off-by: Kevin Rogovin <kevin.rogovin at intel.com>
> ---
> diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
> index 014b434..5d98922 100644
> --- a/src/mesa/drivers/dri/i965/brw_sf_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
> @@ -52,6 +52,12 @@ static void upload_sf_vp(struct brw_context *brw)
> sizeof(*sfv), 32, &brw->sf.vp_offset);
> memset(sfv, 0, sizeof(*sfv));
>
> + /* Accessing the fields Width and Height of gl_framebuffer to produce the
> + * values to program the viewport and scissor is fine as long as the
> + * gl_framebuffer has atleast one attachment.
at least
> + */
> + assert(ctx->DrawBuffer->_HasAttachments);
> +
> if (render_to_fbo) {
> y_scale = 1.0;
> y_bias = 0;
More information about the mesa-dev
mailing list