diff options
author | Antia Puentes <[email protected]> | 2018-04-28 14:09:22 +0200 |
---|---|---|
committer | Antia Puentes <[email protected]> | 2018-05-02 11:24:46 +0200 |
commit | 3a1df14a7b5c1652aa72eb6cf43e69ab447c6273 (patch) | |
tree | b9aa5c98105b28027119cfaf2b2c2a611cdbdfbc /src/intel/compiler/brw_nir.c | |
parent | 0fb204fac14cd2c7cf4a04f4060d4000bf5e3d35 (diff) |
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 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102678
Diffstat (limited to 'src/intel/compiler/brw_nir.c')
-rw-r--r-- | src/intel/compiler/brw_nir.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/intel/compiler/brw_nir.c b/src/intel/compiler/brw_nir.c index a624deb6d2a..9998c59586e 100644 --- a/src/intel/compiler/brw_nir.c +++ b/src/intel/compiler/brw_nir.c @@ -238,8 +238,7 @@ brw_nir_lower_vs_inputs(nir_shader *nir, */ const bool has_sgvs = nir->info.system_values_read & - (BITFIELD64_BIT(SYSTEM_VALUE_BASE_VERTEX) | - BITFIELD64_BIT(SYSTEM_VALUE_FIRST_VERTEX) | + (BITFIELD64_BIT(SYSTEM_VALUE_FIRST_VERTEX) | BITFIELD64_BIT(SYSTEM_VALUE_BASE_INSTANCE) | BITFIELD64_BIT(SYSTEM_VALUE_VERTEX_ID_ZERO_BASE) | BITFIELD64_BIT(SYSTEM_VALUE_INSTANCE_ID)); @@ -261,7 +260,6 @@ brw_nir_lower_vs_inputs(nir_shader *nir, nir_intrinsic_instr *intrin = nir_instr_as_intrinsic(instr); switch (intrin->intrinsic) { - case nir_intrinsic_load_base_vertex: case nir_intrinsic_load_first_vertex: case nir_intrinsic_load_base_instance: case nir_intrinsic_load_vertex_id_zero_base: @@ -280,7 +278,6 @@ brw_nir_lower_vs_inputs(nir_shader *nir, nir_intrinsic_set_base(load, num_inputs); switch (intrin->intrinsic) { - case nir_intrinsic_load_base_vertex: case nir_intrinsic_load_first_vertex: nir_intrinsic_set_component(load, 0); break; |