Skip to content

Conversation

@marius-pelegrin-arm
Copy link
Contributor

The InitDx12AccelerationStructureCommandHeader meta command header already contains the "uncompressed data size" as a field, it is just named inputs_data_size instead of data_size.

Because of this, an additonal data_size field has been added to the associated API Payload structure instead of simply renaming the field.

I propose to remove this additional data_size field and rename inputs_data_size into data_size to be more coherent with the meta command dispatching framework.

The `InitDx12AccelerationStructureCommandHeader` meta command
header already contains the "uncompressed data size" as a field,
it is just named `inputs_data_size` instead of `data_size`.

Because of this, an additonal `data_size` field has been added to
the associated API Payload structure instead of simply renaming
the field.

I propose to remove this additional `data_size` field and rename
`inputs_data_size` into `data_size` to be more coherent with
the meta command dispatching framework

Change-Id: I3a6608fca0000e208603e5f9b7d0918ae2bd0ab4
@marius-pelegrin-arm marius-pelegrin-arm requested a review from a team as a code owner December 19, 2025 10:44
@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 605439.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 8397 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 8397 passed.

@marius-pelegrin-arm
Copy link
Contributor Author

The error looks like a network error unrelated to my commit, can I get a confirmation ?

Copy link
Contributor

@davidd-lunarg davidd-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. I do have one comment/question. @jzulauf-lunarg Could you also review?

{
const char* label = "init DX12 acceleration structure meta-data block";
ParameterReadResult read_result = ReadParameterBuffer(label, block_buffer, header.inputs_data_size);
ParameterReadResult read_result = ReadParameterBuffer(label, block_buffer, header.data_size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The third argument uncompressed_size to BlockParser::ReadParameterBuffer is ignored when compression is off, so header.data_size (previously header.inputs_data_size) is not used to set result.uncompressed_size.

else
{
// For uncompressed blocks the data size is the parameter buffer size
result.uncompressed_size = block_buffer.Remainder();
}

Looking at how block_buffer.Remainder() is calculated, I think uncompressed_size == block_buffer.Remainder() when the uncompressed_size argument is non-default. @jzulauf-lunarg Should an assert be added in ReadParameterBuffer to enforce/verify this? For example:

    else
    {
        // For uncompressed blocks the data size is the parameter buffer size
+       GFXRECON_ASSERT(uncompressed_size == kReadSizeFromBuffer || uncompressed_size == block_buffer.Remainder());
        result.uncompressed_size = block_buffer.Remainder();
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants