[Mesa-dev] [PATCH] i965: use _Shader to get fragment program when updating surface state

Francisco Jerez currojerez at riseup.net
Wed Dec 2 03:53:19 PST 2015


Tapani Pälli <tapani.palli at intel.com> writes:

> Atomic counters and Images were using ctx::Shader that does not take in
> to account program pipeline changes, ctx::_Shader must be used for SSO to
> work. Commit c0347705 already changed ubo's to use this.
>
> Fixes failures seen with following Piglit test:
> 	arb_separate_shader_object-atomic-counter
>
> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
> ---
>  src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> index ac214e3..2c56995 100644
> --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
> @@ -1061,7 +1061,7 @@ brw_upload_wm_abo_surfaces(struct brw_context *brw)
>  {
>     struct gl_context *ctx = &brw->ctx;
>     /* _NEW_PROGRAM */
> -   struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
> +   struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram;
>  
>     if (prog) {
>        /* BRW_NEW_FS_PROG_DATA */
> @@ -1337,7 +1337,7 @@ brw_upload_wm_image_surfaces(struct brw_context *brw)
>  {
>     struct gl_context *ctx = &brw->ctx;
>     /* BRW_NEW_FRAGMENT_PROGRAM */
> -   struct gl_shader_program *prog = ctx->Shader._CurrentFragmentProgram;
> +   struct gl_shader_program *prog = ctx->_Shader->_CurrentFragmentProgram;
>  

Thanks,
Reviewed-by: Francisco Jerez <currojerez at riseup.net>

I guess it would be a good idea to CC mesa-stable too?

>     if (prog) {
>        /* BRW_NEW_FS_PROG_DATA, BRW_NEW_IMAGE_UNITS, _NEW_TEXTURE */
> -- 
> 2.5.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151202/210003fa/attachment.sig>


More information about the mesa-dev mailing list