[Mesa-dev] [PATCH 1/4] i965/gen6: setup limits for ARB_viewport_array

Kenneth Graunke kenneth at whitecape.org
Tue May 5 23:10:35 PDT 2015


On Wednesday, May 06, 2015 06:08:17 PM Chris Forbes wrote:
> Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
> ---
>  src/mesa/drivers/dri/i965/brw_context.c | 4 ++--
>  src/mesa/drivers/dri/i965/brw_defines.h | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index 6c00f6c..fd7420a 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -598,8 +598,8 @@ brw_initialize_context_constants(struct brw_context *brw)
>     ctx->Const.ShaderCompilerOptions[MESA_SHADER_COMPUTE].NirOptions = &nir_options;
>  
>     /* ARB_viewport_array */
> -   if (brw->gen >= 7 && ctx->API == API_OPENGL_CORE) {
> -      ctx->Const.MaxViewports = GEN7_NUM_VIEWPORTS;
> +   if (brw->gen >= 6 && ctx->API == API_OPENGL_CORE) {
> +      ctx->Const.MaxViewports = GEN6_NUM_VIEWPORTS;
>        ctx->Const.ViewportSubpixelBits = 0;
>  
>        /* Cast to float before negating because MaxViewportWidth is unsigned.
> diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h
> index 7b5dd45..83d7a35 100644
> --- a/src/mesa/drivers/dri/i965/brw_defines.h
> +++ b/src/mesa/drivers/dri/i965/brw_defines.h
> @@ -1712,7 +1712,7 @@ enum brw_message_target {
>  # define GEN6_CC_VIEWPORT_MODIFY			(1 << 12)
>  # define GEN6_SF_VIEWPORT_MODIFY			(1 << 11)
>  # define GEN6_CLIP_VIEWPORT_MODIFY			(1 << 10)
> -# define GEN7_NUM_VIEWPORTS				16
> +# define GEN6_NUM_VIEWPORTS				16
>  
>  #define _3DSTATE_VIEWPORT_STATE_POINTERS_CC	0x7823 /* GEN7+ */
>  #define _3DSTATE_VIEWPORT_STATE_POINTERS_SF_CL	0x7821 /* GEN7+ */
> 

This series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

(I actually read it before Chris posted it)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150505/76fe20e4/attachment.sig>


More information about the mesa-dev mailing list