intel: activate the gl_BaseVertex lowering
authorAntia Puentes <apuentes@igalia.com>
Sat, 28 Apr 2018 12:09:22 +0000 (14:09 +0200)
committerAntia Puentes <apuentes@igalia.com>
Wed, 2 May 2018 09:24:46 +0000 (11:24 +0200)
commit3a1df14a7b5c1652aa72eb6cf43e69ab447c6273
treeb9aa5c98105b28027119cfaf2b2c2a611cdbdfbc
parent0fb204fac14cd2c7cf4a04f4060d4000bf5e3d35
intel: activate the gl_BaseVertex lowering

Surplus code related to the basevertex is removed.

The Vertex Elements contain now:
* VE 1: <firstvertex, BaseInstance, VertexID, InstanceID>
* VE 2: <DrawID, is_indexed_draw, 0, 0>

Also fixes unreachable message.

Fixes OpenGL CTS tests:
* KHR-GL46.shader_draw_parameters_tests.ShaderDrawArraysInstancedParameters
* KHR-GL46.shader_draw_parameters_tests.ShaderMultiDrawArraysParameters
* KHR-GL46.shader_draw_parameters_tests.MultiDrawArraysIndirectCountParameters
* KHR-GL46.shader_draw_parameters_tests.ShaderDrawArraysParameters
* KHR-GL46.shader_draw_parameters_tests.ShaderMultiDrawArraysIndirectParameters

Fixes Piglit tests:
* arb_shader_draw_parameters-drawid-indirect baseinstance
* arb_shader_draw_parameters-basevertex

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102678
src/intel/compiler/brw_compiler.c
src/intel/compiler/brw_compiler.h
src/intel/compiler/brw_fs_nir.cpp
src/intel/compiler/brw_nir.c
src/intel/compiler/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_draw.c
src/mesa/drivers/dri/i965/brw_draw_upload.c
src/mesa/drivers/dri/i965/genX_state_upload.c