mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
7eba063136
We have to distinguish between the "bind count" and the "allocation size" of variables. The "allocation size" affects the starting register id for the resource to be allocated next, while the "bind count" is determined by the last field actually used. The former may be larger than the latter. What we are currently calling hlsl_reg.bind_count is actually the "allocation size", so a rename is in order. The real "bind count", which will be introduced in following patches, is important because it is what should be shown in the RDEF table and some resource allocation rules depend on it. For instance, for this shader: texture2D texs[3]; texture2D tex; float4 main() : sv_target { return texs[0].Load(int3(0, 0, 0)) + tex.Load(int3(0, 0, 0)); } the variable "texs" has a "bind count" of 1, but an "allocation size" of 3: // Resource Bindings: // // Name Type Format Dim HLSL Bind Count // ------------------------------ ---------- ------- ----------- -------------- ------ // texs texture float4 2d t0 1 // tex texture float4 2d t3 1 |
||
---|---|---|
.. | ||
checksum.c | ||
d3d_asm.c | ||
d3dbc.c | ||
dxbc.c | ||
dxil.c | ||
glsl.c | ||
hlsl_codegen.c | ||
hlsl_constant_ops.c | ||
hlsl.c | ||
hlsl.h | ||
hlsl.l | ||
hlsl.y | ||
ir.c | ||
libvkd3d-shader.pc.in | ||
preproc.h | ||
preproc.l | ||
preproc.y | ||
spirv.c | ||
tpf.c | ||
vkd3d_shader_main.c | ||
vkd3d_shader_private.h | ||
vkd3d_shader.map |