Module: vkd3d Branch: master Commit: 96f66aa4f88ebd695a3ac8d7f79c6ffd89ee2dce URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/96f66aa4f88ebd695a3ac8d7f79c6f...
Author: Francisco Casas fcasas@codeweavers.com Date: Mon Aug 7 18:53:57 2023 -0400
vkd3d-shader/d3dbc: Use the bind count instead of the allocation size in d3dbc.c.
This should have no effect, since in SM1 the allocation size is the same as the bind count because there are no texture registers. It is just done for consistency.
---
libs/vkd3d-shader/d3dbc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/d3dbc.c b/libs/vkd3d-shader/d3dbc.c index 1156d593..99a5bd7a 100644 --- a/libs/vkd3d-shader/d3dbc.c +++ b/libs/vkd3d-shader/d3dbc.c @@ -1686,7 +1686,7 @@ static void write_sm1_uniforms(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffe else { put_u32(buffer, vkd3d_make_u32(D3DXRS_SAMPLER, var->regs[r].id)); - put_u32(buffer, var->regs[r].allocation_size); + put_u32(buffer, var->bind_count[r]); } put_u32(buffer, 0); /* type */ put_u32(buffer, 0); /* FIXME: default value */ @@ -2033,7 +2033,7 @@ static void write_sm1_sampler_dcls(struct hlsl_ctx *ctx, struct vkd3d_bytecode_b if (!var->regs[HLSL_REGSET_SAMPLERS].allocated) continue;
- count = var->regs[HLSL_REGSET_SAMPLERS].allocation_size; + count = var->bind_count[HLSL_REGSET_SAMPLERS];
for (i = 0; i < count; ++i) {