Reviewed-by: Tim Rowley <timothy.o.row...@intel.com>

> On Jun 29, 2017, at 2:41 PM, Bruce Cherniak <bruce.chern...@intel.com> wrote:
> 
> In swr_update_derived, for consistency, index buffer validation should
> be using the p_draw_info copy "info" rather than referencing
> p_draw_info.
> 
> No functional change.
> ---
> src/gallium/drivers/swr/swr_state.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/gallium/drivers/swr/swr_state.cpp 
> b/src/gallium/drivers/swr/swr_state.cpp
> index 7a8786d96f..03dc324afe 100644
> --- a/src/gallium/drivers/swr/swr_state.cpp
> +++ b/src/gallium/drivers/swr/swr_state.cpp
> @@ -1293,7 +1293,7 @@ swr_update_derived(struct pipe_context *pipe,
>          const uint8_t *p_data;
>          uint32_t size, pitch;
> 
> -         pitch = p_draw_info->index_size ? p_draw_info->index_size : 
> sizeof(uint32_t);
> +         pitch = info.index_size ? info.index_size : sizeof(uint32_t);
>          index_type = swr_convert_index_type(pitch);
> 
>          if (!info.has_user_indices) {
> @@ -1319,7 +1319,7 @@ swr_update_derived(struct pipe_context *pipe,
>          }
> 
>          SWR_INDEX_BUFFER_STATE swrIndexBuffer;
> -         swrIndexBuffer.format = 
> swr_convert_index_type(p_draw_info->index_size);
> +         swrIndexBuffer.format = swr_convert_index_type(info.index_size);
>          swrIndexBuffer.pIndices = p_data;
>          swrIndexBuffer.size = size;
> 
> -- 
> 2.11.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to