On 8/19/21 10:31 AM, Matteo Bruni wrote:
On Tue, Aug 17, 2021 at 7:40 PM Zebediah Figura zfigura@codeweavers.com wrote:
Signed-off-by: Zebediah Figura zfigura@codeweavers.com
include/vkd3d_d3dcommon.idl | 45 ++++++++ libs/vkd3d-shader/hlsl_sm4.c | 141 +++++++++++++++++++++++ libs/vkd3d-shader/vkd3d_shader_private.h | 2 + 3 files changed, 188 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index c9a427d8..e9cfa2b6 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c
- i = 0;
- LIST_FOR_EACH_ENTRY(cbuffer, &ctx->buffers, struct hlsl_buffer, entry)
- {
size_t vars_start = bytecode_get_size(&buffer);
const struct hlsl_ir_var *var;
if (!cbuffer->reg.allocated)
continue;
set_u32(&buffer, cbuffers_offset + (i++ * 6 + 2) * sizeof(uint32_t), vars_start);
LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry)
{
if (var->is_uniform && var->buffer == cbuffer)
{
uint32_t flags = 0;
if (var->last_read)
flags |= D3D_SVF_USED;
put_u32(&buffer, 0); /* name */
Mostly for my own reference, the variable name is left unset here. It will be filled in the next patch, together with the type.
That was probably a mistake, either in patch naming or contents, though I guess it's not worth fixing at this point.