summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKrzysztof Raszkowski <[email protected]>2020-03-03 15:02:20 +0000
committerMarge Bot <[email protected]>2020-03-03 19:33:36 +0000
commit42ee6ff706f864d7666603af282ab30544ee638a (patch)
treefc6f8de698ad88613ac3e4204bbb687a38c73956 /src
parent291f40a4991a7fe6d6091051421290c585bb63a8 (diff)
Revert "gallium/swr: Fix min/max range index draw"
This reverts commit 5e9a2c603f38308f7027d6a5e4575e5fc24c1bd5 Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4032> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4032>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.h9
-rw-r--r--src/gallium/drivers/swr/swr_state.cpp9
2 files changed, 2 insertions, 16 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.h b/src/gallium/auxiliary/util/u_vbuf.h
index 3031a30bb47..81dac2caf33 100644
--- a/src/gallium/auxiliary/util/u_vbuf.h
+++ b/src/gallium/auxiliary/util/u_vbuf.h
@@ -28,10 +28,6 @@
#ifndef U_VBUF_H
#define U_VBUF_H
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/* This module takes care of user buffer uploads and vertex format fallbacks.
* It's designed for the drivers which don't want to use the Draw module.
* There is a more detailed description at the beginning of the .c file.
@@ -91,9 +87,4 @@ void u_vbuf_restore_vertex_elements(struct u_vbuf *mgr);
void u_vbuf_save_vertex_buffer0(struct u_vbuf *mgr);
void u_vbuf_restore_vertex_buffer0(struct u_vbuf *mgr);
-
-#ifdef __cplusplus
-}
-#endif
-
#endif
diff --git a/src/gallium/drivers/swr/swr_state.cpp b/src/gallium/drivers/swr/swr_state.cpp
index 2967dd233cd..625f0050ad5 100644
--- a/src/gallium/drivers/swr/swr_state.cpp
+++ b/src/gallium/drivers/swr/swr_state.cpp
@@ -51,7 +51,6 @@
#include "util/u_framebuffer.h"
#include "util/u_viewport.h"
#include "util/u_prim.h"
-#include "util/u_vbuf.h"
#include "swr_state.h"
#include "swr_context.h"
@@ -1400,12 +1399,8 @@ swr_update_derived(struct pipe_context *pipe,
/* Set vertex & index buffers */
if (ctx->dirty & SWR_NEW_VERTEX) {
- struct pipe_draw_info info = *p_draw_info;
- /* SWR always need min/max index info for index draw,
- * compute it if upper layer does not do for us */
- if (info.index_size > 0 && info.max_index == ~0u) {
- u_vbuf_get_minmax_index(pipe, &info, &(info.min_index), &(info.max_index));
- }
+ const struct pipe_draw_info &info = *p_draw_info;
+
/* vertex buffers */
SWR_VERTEX_BUFFER_STATE swrVertexBuffers[PIPE_MAX_ATTRIBS];
for (UINT i = 0; i < ctx->num_vertex_buffers; i++) {