swr: Minor cleanup of variable usage, no functional change.
authorBruce Cherniak <bruce.cherniak@intel.com>
Thu, 29 Jun 2017 19:41:31 +0000 (14:41 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Fri, 30 Jun 2017 18:26:19 +0000 (13:26 -0500)
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.

Reviewed-by: Tim Rowley <timothy.o.rowley@intel.com>
src/gallium/drivers/swr/swr_state.cpp

index 897ce998fff1d06895e2bf0d17e316b96f793022..45c9c213e5b5f63f20bdb152b6fb1e2aa5df5d3a 100644 (file)
@@ -1294,7 +1294,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) {
@@ -1320,7 +1320,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;