util: Add util functionality for GL4.1 support
authorNeha Bhende <bhenden@vmware.com>
Tue, 26 May 2020 15:43:14 +0000 (21:13 +0530)
committerMarge Bot <eric+marge@anholt.net>
Fri, 5 Jun 2020 06:36:54 +0000 (06:36 +0000)
commit48a7456f4df53b94f0335f8b605ca2da9ed16d81
tree195e8df98b67d718f2179132c4b419c2ae33c52b
parentf1f81abfd440b7b8ddb51203878a6b97547c19f5
util: Add util functionality for GL4.1 support

This patch adds the following tgsi utilities

* tgsi_dynamic_indexing: This utility flattens out the dyanamic indexing of constant buffers
* tgsi_vpos: This utility writes zeros to position at index 0 in vertex shader.
  This utility can be used if there is no shader output in vertex shader
* util_make_tess_ctrl_passthrough_shader: This adds passthough tessellation control shader.
  Input of passthrough tess ctrl shader is output of vertex shader
  and output is input of tessellation eval shader.
  If program has tessellation eval shader but no tessellation control shader,
  this utility can be used to create passthrough tessellation control shader.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Signed-off-by: Neha Bhende <bhenden@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5317>
src/gallium/auxiliary/meson.build
src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c [new file with mode: 0644]
src/gallium/auxiliary/tgsi/tgsi_dynamic_indexing.h [new file with mode: 0644]
src/gallium/auxiliary/tgsi/tgsi_transform.h
src/gallium/auxiliary/tgsi/tgsi_vpos.c [new file with mode: 0644]
src/gallium/auxiliary/tgsi/tgsi_vpos.h [new file with mode: 0644]
src/gallium/auxiliary/util/u_simple_shaders.c
src/gallium/auxiliary/util/u_simple_shaders.h