VideoCommon: Add dynamic vertex loader to ubershaders

This commit is contained in:
TellowKrinkle
2022-06-18 01:09:35 -05:00
parent 720b3f5519
commit 4c629c2bee
17 changed files with 253 additions and 66 deletions

View File

@ -177,6 +177,7 @@ union ShaderHostConfig
BitField<24, 1, bool, u32> manual_texture_sampling;
BitField<25, 1, bool, u32> manual_texture_sampling_custom_texture_sizes;
BitField<26, 1, bool, u32> backend_sampler_lod_bias;
BitField<27, 1, bool, u32> backend_dynamic_vertex_loader;
static ShaderHostConfig GetCurrent();
};
@ -302,6 +303,15 @@ static const char s_shader_uniforms[] = "\tuint components;\n"
"\tuint4 xfmem_pack1[8];\n"
"\tfloat4 " I_CACHED_TANGENT ";\n"
"\tfloat4 " I_CACHED_BINORMAL ";\n"
"\tuint vertex_stride;\n"
"\tuint vertex_offset_rawnormal;\n"
"\tuint vertex_offset_rawtangent;\n"
"\tuint vertex_offset_rawbinormal;\n"
"\tuint vertex_offset_rawpos;\n"
"\tuint vertex_offset_posmtx;\n"
"\tuint vertex_offset_rawcolor0;\n"
"\tuint vertex_offset_rawcolor1;\n"
"\tuint4 vertex_offset_rawtex[2];\n" // std140 is pain
"\t#define xfmem_texMtxInfo(i) (xfmem_pack1[(i)].x)\n"
"\t#define xfmem_postMtxInfo(i) (xfmem_pack1[(i)].y)\n"
"\t#define xfmem_color(i) (xfmem_pack1[(i)].z)\n"