Module: Mesa
Branch: master
Commit: a5819e1b4922953ad507f65903dcaf16a579c5e2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5819e1b4922953ad507f65903dcaf16a579c5e2

Author: Axel Davy <[email protected]>
Date:   Sat Mar  6 17:16:55 2021 +0100

st/nine: Use correct bind flag at buffer creation

The buffer bind creation flag was incorrect for index buffers

Signed-off-by: Axel Davy <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9451>

---

 src/gallium/frontends/nine/buffer9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/frontends/nine/buffer9.c 
b/src/gallium/frontends/nine/buffer9.c
index e51392675f9..9f02667d546 100644
--- a/src/gallium/frontends/nine/buffer9.c
+++ b/src/gallium/frontends/nine/buffer9.c
@@ -68,7 +68,7 @@ NineBuffer9_ctor( struct NineBuffer9 *This,
 
     /* Note: WRITEONLY is just tip for resource placement, the resource
      * can still be read (but slower). */
-    info->bind = PIPE_BIND_VERTEX_BUFFER;
+    info->bind = (Type == D3DRTYPE_INDEXBUFFER) ? PIPE_BIND_INDEX_BUFFER : 
PIPE_BIND_VERTEX_BUFFER;
 
     /* It is hard to find clear information on where to place the buffer in
      * memory depending on the flag.

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to