[GPU] Shaders to common, xb buildshaders instead of buildhlsl

This commit is contained in:
Triang3l
2021-06-05 18:53:53 +03:00
parent 313fb3e5a3
commit 12a907bfa5
582 changed files with 419273 additions and 244715 deletions

View File

@@ -0,0 +1,15 @@
#include "endian.hlsli"
#include "xenos_draw.hlsli"
XeHSControlPointInputIndexed main(uint xe_vertex_id : SV_VertexID) {
XeHSControlPointInputIndexed output;
// Only the lower 24 bits of the vertex index are used (tested on an Adreno
// 200 phone). `((index & 0xFFFFFF) + offset) & 0xFFFFFF` is the same as
// `(index + offset) & 0xFFFFFF`.
output.index =
float(clamp((XeEndianSwap32(xe_vertex_id, xe_vertex_index_endian) +
xe_vertex_index_offset) &
0xFFFFFFu,
xe_vertex_index_min_max.x, xe_vertex_index_min_max.y));
return output;
}