summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/etnaviv/etnaviv_context.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-07etnaviv: stop leaking the dummy texure descriptor BOLucas Stach1-0/+3
Free the dummy texture descriptor BO on context destroy. Fixes: eda73d71277a (etnaviv: GC7000: Texture descriptors) Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: <mesa-stable@lists.freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6986>
2020-08-26etnaviv: Add lock around pending_ctxMarek Vasut1-0/+11
The content of rsc->pending_ctx could be changed from multiple contexts and thus from multiple threads. The per-context lock is not sufficient to protect this list. Add per-resource lock to protect this list. Fixes: e5cc66dfad0 ("etnaviv: Rework locking") Signed-off-by: Marek Vasut <marex@denx.de> Cc: <mesa-stable@lists.freedesktop.org> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6454>
2020-08-26etnaviv: Fix disabling early-z rejection on GC7000L (HALTI5)Lukas F. Hartmann1-3/+0
The VIVS_PE_DEPTH_CONFIG_DISABLE_ZS in PE_DEPTH_CONFIG caused depth write hangs on HALTI5. This is because the 0x11000000 bits in RA have to be toggled on when setting this bit to zero. This combination will disable early-z rejection on GC7000L, which was previously done through a different bit. Tested only on GC7000L so far. Signed-off-by: Lukas F. Hartmann <lukas@mntre.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5456>
2020-07-06etnaviv: replace prims-emitted queryChristian Gmeiner1-1/+1
As we do not support stream output buffers we only count the primitives processed by the pipeline. Use the correct query type. Cc: <mesa-stable@lists.freedesktop.org> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5754>
2020-05-13gallium: change comments to remove 'state tracker'Marek Olšák1-1/+1
Acked-by: Eric Anholt <eric@anholt.net> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4902>
2020-04-24etnaviv: drop default state for FE_HALTI5_ID_CONFIGChristian Gmeiner1-1/+0
It gets emitted when needed - see emit_halti5_only_state(..). Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4729>
2020-04-10etnaviv: drop redundant calls to etna_acc_query_suspend(..)Christian Gmeiner1-3/+0
Introduced by accident during rebase. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4456>
2020-04-05etnaviv: explicitly call resource_written(..)Christian Gmeiner1-3/+0
We might end in cases where etna_acc_get_query_result(..) gets called within one draw call (aka before flushing). At this point the status of the resource was not set but gets used in etna_acc_get_query_result(..) to handle different wait cases. Fix this issue by calling resource_written(..) explicitly. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
2020-04-05etnaviv: rename hw queries to acc queriesChristian Gmeiner1-8/+11
The name hw queries was choosen as occlusion queries are 'feeling' like nothing special. It is possible to interact with them only via the command stream - unlike perfom queries where some kernel magic is needed. Accumulated HW queries is a much better name for this type of queries. We read some hardware values over some draw calls and need to accumulate them to get the final result. This is some prep work for the following perfmon changes. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1530>
2020-03-13etnaviv: get rid of etna_spec in etna_contextChristian Gmeiner1-10/+11
There is no need to have a complete copy of etna_spec - just reference the one and only from etna_screen. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4095>
2020-03-08etnaviv: implement emit_string_markerChristian Gmeiner1-0/+31
Writes string to cmdstream in payload of a nop command. Could be useful for internal driver debugging too. Here is how it looks decoded: 0x18000000, /* NOP (3) OP=NOP */ 0x65736572, /* rese */ 0x18000000, /* NOP (3) OP=NOP */ 0x00000074, /* t */ 0x00000000, /* GL.API_MODE := OPENGL */ or 0x00000705, /* GL.STALL_TOKEN := FROM=RA,TO=PE,FLIP0=0,FLIP1=0 */ 0x00000001, /* TS.FLUSH_CACHE := FLUSH=1 */ 0x18000000, /* NOP (3) OP=NOP */ 0x616e7465, /* etna */ 0x18000000, /* NOP (3) OP=NOP */ 0x6275735f, /* _sub */ 0x18000000, /* NOP (3) OP=NOP */ 0x5f74696d, /* mit_ */ 0x18000000, /* NOP (3) OP=NOP */ 0x735f7372, /* rs_s */ 0x18000000, /* NOP (3) OP=NOP */ 0x65746174, /* tate */ 0x00004606, /* RS.CONFIG := SOURCE_FORMAT=A8R8G8B8 Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3744> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3744>
2020-03-08etnaviv: increase number of supported varyings to 16Christian Gmeiner1-1/+0
No deqp regressions. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3827> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3827>
2020-03-06etnaviv: add etna_constbuf_state objectChristian Gmeiner1-4/+5
With this new state object we keep track of enabled pipe_constant_buffer and only mark them as read when needed. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4088> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4088>
2020-01-29etnaviv: drop default state for PE_STENCIL_CONFIG_EXT2Christian Gmeiner1-1/+0
It gets emitted when needed. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3631> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3631>
2020-01-29etnaviv: implement UBOsJonathan Marek1-2/+4
At the same time, use pre-HALTI2 to use address register for indirect uniform loads, since integers/LOAD instruction isn't always available. Passes all dEQP-GLES3.functional.ubo.* on GC7000L. GC3000 with an extra flush hack passes most of them, but still fails on some of the cases with many loads. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3389> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3389>
2020-01-08etnaviv: HALTI2+ instanced drawJonathan Marek1-1/+1
Fixes: dEQP-GLES3.functional.draw.draw_arrays_instanced.* dEQP-GLES3.functional.draw.draw_elements_instanced.* Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-12-20etnaviv: update resource status after flushingChristian Gmeiner1-0/+8
Currently piglit spec@arb_occlusion_query@occlusion_query_conform spins for ever as the resource status is never reset. See etna_hw_get_query_result(..) for more details. Fixes: 1456aa61cc5 ("etnaviv: Rework resource status tracking") CC: <mesa-stable@lists.freedesktop.org> Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Marek Vasut <marex@denx.de>
2019-12-14gallium/util: add alignment parameter to util_upload_index_bufferErico Nunes1-1/+1
At least on Mali Utgard, index buffers need to be aligned on 0x40. To avoid duplicating this, add an alignment parameter. Keep the previous default for the other existing users. Signed-off-by: Erico Nunes <nunes.erico@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2445>
2019-11-18etnaviv: separate PE and RS formats, use only RS only for tilingJonathan Marek1-1/+1
There are PE formats not supported by RS, so we can't have a single to translate both. Use RS only for same formats until we have a translate_rs_format and test the possible different format blits. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-10-20etnaviv: fix code styleChristian Gmeiner1-1/+2
Fixes: 1194afdfe35 ("etnaviv: rework the stream flush to always go through the context flush") Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-20etnaviv: fix compile warningsChristian Gmeiner1-2/+0
Fixes: e5cc66dfad0 ("etnaviv: Rework locking") Fixes: 1456aa61cc5 ("etnaviv: Rework resource status tracking") Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-18etnaviv: GC7000: flush TX descriptor and instruction cacheLucas Stach1-0/+7
The etnaviv kernel driver will only ever flush write caches. As both the TX descriptor and instruction cache are read caches they must be flushed from the user cmdstream at an appropriate time. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-18etnaviv: GC7000: Texture descriptorsWladimir J. van der Laan1-0/+25
Create a separate implementation file with texture-descriptor-based sampler views and sampler states. Initialize the one or the other based on the GPU. There is so little in common that this seemed more appropriate that keeping them as one type of state object would only be confusing. This commit is actually a combiation of the original commit by Wladimir, fixes and TS implementation from Jonathan and changed to use softpin by Lucas. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Signed-off-by: Jonathan Marek <jonathan@marek.ca> Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-18etnaviv: Rework lockingMarek Vasut1-5/+11
Replace the per-screen locking of flushing with per-context one and add per-context lock around command stream buffer accesses, to prevent cross-context flushing from corrupting these command stream buffers. Signed-off-by: Marek Vasut <marex@denx.de>
2019-10-18etnaviv: Rework resource status trackingMarek Vasut1-10/+38
Have each context track which resources it marked as pending read and pending write. Have each resource track in which context it is pending. This way, it is possible to identify when a resource is both pending read and pending write at the same time. Moreover, the status field can be correctly calculated and updated when necessary. Signed-off-by: Marek Vasut <marex@denx.de>
2019-10-18etnaviv: rework the stream flush to always go through the context flushLucas Stach1-36/+43
This way we can ensure that the pipe driver tracking of pending resources stays in sync with the actual command buffer state, even if a space reservation triggers a forced flush. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-18etnaviv: keep references to pending resourcesLucas Stach1-0/+3
As long as a resource is pending in any context we must not destroy it, otherwise we'll hit a classical use-after-free with fireworks. To avoid this take a reference when the resource is first added to the pending set and put the reference when no longer pending. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-10-18etnaviv: Make contexts track resourcesMarek Vasut1-4/+31
Currently, the screen tracks all resources for all contexts, but this is not correct. Each context should track the resources it uses. This also allows a context to detect whether a resource is used by another context and to notify another context using a resource that the current context is done using the resource. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Christian Gmeiner <christian.gmeiner@gmail.com> Cc: Guido Günther <guido.gunther@puri.sm> Cc: Lucas Stach <l.stach@pengutronix.de>
2019-10-11etnaviv: clear texture cache and flush ts when texture is modifiedJonathan Marek1-3/+11
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-10-02etnaviv: enable triangle strips only when the hardware supports itGert Wollny1-1/+7
Some hardware has a bug with triangle strips and it is signalled by the flag BUG_FIXED8 whether this bug has been fixed. So only enable triangle strips when this flag is set. Thanks: Jonathan Marek and Christian Gmeiner for the pointers v2: Add TODO to indicate that the handling should be refined (Jonathan & Christian) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-09-28etnaviv: nir: fix gl_FrontFacingJonathan Marek1-1/+4
Only invert front facing when glFrontFace is GL_CW. Fixes following deqp test: dEQP-GLES2.functional.shaders.builtin_variable.frontfacing Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-09-17etnaviv: a bit of micro-optimizationChristian Gmeiner1-1/+1
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-08-19etnaviv: update headers from rnndbChristian GMEINER1-1/+1
Update to etna_viv commit c51353e. Signed-off-by: Christian GMEINER <christian.GMEINER@bachmann.info> Reviewed-by: Philipp Zabel <philipp.zabel@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca>
2019-08-14etnaviv: Use reentrant screen lock around flushMarek Vasut1-0/+5
The flush callback may be called on the same pipe context, and thus the same stream, from two different threads of execution. However, etna_cmd_stream_flush{,2}() must not be called on the same stream from two different threads of execution as that would mess up the etna_bo refcounting and likely have other ugly side effects. Fix this by using a reentrant screen lock around the flush callback. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
2019-07-17etnaviv: fix blend color on newer GPUsJonathan Marek1-2/+0
Newer GPUs use the half float ALPHA_COLOR_EXT register. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-07-04etnaviv: implement TS_MODE for GC7000LJonathan Marek1-1/+0
GC7000L has a TS mode with larger tiles, which improves performance. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-06-05etnaviv: untabifyGuido Günther1-2/+2
Two driver files had tabs mixed with spaces. Remove the tabs. Signed-off-by: Guido Günther <guido.gunther@puri.sm> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-03-01etnaviv: fix compile warningsChristian Gmeiner1-1/+0
Fixes the following compile warnings: [591/629] Compiling C object 'src/gallium/drivers/etnaviv/df32d18@@etnaviv@sta/etnaviv_context.c.o'. ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_context.c: In function 'etna_cmd_stream_reset_notify': ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_context.c:334:22: warning: unused variable 'entry' [-Wunused-variable] struct set_entry *entry; ^~~~~ [604/629] Compiling C object 'src/gallium/drivers/etnaviv/df32d18@@etnaviv@sta/etnaviv_resource.c.o'. ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_resource.c: In function 'etna_resource_used': ../../src/ac_mesa/src/gallium/drivers/etnaviv/etnaviv_resource.c:649:22: warning: unused variable 'entry' [-Wunused-variable] struct set_entry *entry; ^~~~~ Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2019-03-01etnaviv: fix resource usage tracking across different pipe_context'sChristian Gmeiner1-12/+14
A pipe_resource can be shared by all the pipe_context's hanging off the same pipe_screen. Changes from v2 -> v3: - add locking with mtx_*() to resource and screen (Marek) Changes from v3 -> v4: - drop rsc->lock, just use screen->lock for the entire serialization (Marek) - simplify etna_resource_used() flush condition, which also prevents potentially flushing resources twice (Marek) - don't remove resouces from screen->used_resources in etna_cmd_stream_reset_notify(), they may still be used in other contexts and may need flushing there later on (Marek) Changes from v4 -> v5: - Fix coding style issues reported by Guido Changes from v5 -> v6: - Add missing locking in etna_transfer_map(..) (Boris) Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Tested-by: Marek Vasut <marex@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Tested-by: Boris Brezillon <boris.brezillon@collabora.com>
2018-12-28etnaviv: Consolidate buffer references from framebuffersTomeu Vizoso1-4/+6
We were leaking surfaces because the references taken in etna_set_framebuffer_state weren't being released on context destroy. Instead of just directly releasing those references in etna_context_destroy, use the util_copy_framebuffer_state helper. Take the chance to remove the duplicated buffer references in compiled_framebuffer_state to avoid confusion. The leak can be reproduced with a client that continuously creates and destroys contexts. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Reported-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2018-12-18etnaviv: use surface format directlyLucas Stach1-7/+2
There is no need to do the detour over the resource behind the surface to get the format. Use the surface format directly. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2018-11-19etnaviv: use dummy RT buffer when rendering without color bufferLucas Stach1-0/+13
At least GC2000 seems to push some dirt from the PE color cache into the last bound render target when drawing depth only. Newer cores seem to behave properly and don't do this, but I have found no way to fix it on GC2000. Flushes and stalls don't seem to make any difference. In order to stop the core from pushing the dirt into a precious real render target, plug in dummy buffer when rendering without a color buffer. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2017-11-30etnaviv: GC7000: Track dirty sampler viewsWladimir J. van der Laan1-0/+1
Need this to efficiently emit texture descriptor invalidations. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-11-30etnaviv: GC7000: Update context reset for ..HALTI5Wladimir J. van der Laan1-5/+32
Update context reset for HALTI3..HALTI5, sorting states for the HALTI version that has them. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-11-30etnaviv: GC7000: BLT engine blitting supportWladimir J. van der Laan1-2/+4
Add an implemenation of key clear_blit functions using the BLT engine that replaced the RS on GC7000. Also set level->size correctly for imported resources. This is important for the BLT resolve-in-place path to work for them. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-11-30etnaviv: Use only DRAW_INSTANCED on GC3000+Wladimir J. van der Laan1-4/+12
The blob does this, as DRAW_INSTANCED can replace fully all the other draw commands. It is also required to handle integer vertex formats. The other path is only there for compatibility and might go away (or at least rot to become buggy due to dis-use) in newer hardware. As a by-effect this changes the behavior for GC3000-, by no longer using the index offset for DRAW_INDEXED but instead adding it to INDEX_ADDR. This should make no difference. Preparation for GC7000 support. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
2017-10-20etnaviv: add basic infrastructure for hw queriesChristian Gmeiner1-0/+11
No hardware query is supported yet. v1 -> v2 - removed query_type from strcut etna_hw_sample_provider Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-10-03etnaviv: Set up unknown GC3000 statesWladimir J. van der Laan1-0/+11
Set up new states that the blob started setting for GC3000 consistently. This makes sure that when another test or driver leaves the GPU in unpredictable state, these states are set up correctly for our rendering. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-10-03etnaviv: Fix point sprite rendering on GC3000Wladimir J. van der Laan1-0/+2
Setting PA_VIEWPORT_UNK state correctly is necessary to make point sprite rendering on GC3000 work. Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
2017-07-14etnaviv: reset indexed rendering information when not rendering indexedWladimir J. van der Laan1-1/+6
A dangling bo object would result in memory corruption while loading a level in ioquake3_opengl2. Fixes: 330d0607ed60 (gallium: remove pipe_index_buffer and set_index_buffer) Suggested-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de>