-
Notifications
You must be signed in to change notification settings - Fork 159
Set current ParsedBlock on decoders and consumers #2567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
CI gfxreconstruct build queued with queue ID 603455. |
|
CI gfxreconstruct build # 8367 running. |
|
CI gfxreconstruct build # 8367 passed. |
jzulauf-lunarg
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is very wrong with this PR. More than one files is diff'ing "all lines changed."
Also, migrating the block index into the ParsedBlock will be trivial after my current pending refactor of ParsedBlock creation. I'll push a WIP of that later today. There's a little cleanup first.
framework/decode/block_parser.cpp
Outdated
| @@ -1,1724 +1,1771 @@ | |||
| /* | |||
| ** Copyright (c) 2018 Valve Corporation | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this whole file changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line endings changed from CRLF to LF. I've started a discussion about GFXR's policy on EOL internally. In the meantime you can disable whitespace diff in this PR's "Files changed" page.
| private: | ||
| void InitBlockHeaderFromSpan(); | ||
| size_t read_pos_{ 0 }; | ||
| uint64_t block_index_{ 0U }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The BlockParser holds the block_index so the BlockBuffer shouldn't have to, the block parser should be able to injected it into the ParsedBlock
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. This was removed because it wasn't being used and now ParsedBlock has the block index.
| const char* message_start = parameter_data.GetDataAs<char>(); | ||
| std::string message(message_start, std::next(message_start, static_cast<size_t>(message_size))); | ||
|
|
||
| return ParsedBlock(GetBlockIndex(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've literally rewritten every single constructor call site to call one of two factory functions. The BlockParser can inject the the BlockIndex in those functions. So I'm wondering if you can wait < 1 week whether there's a lower churn solution that adds this support after my refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes that is no problem.
f8f1740 to
6eace0e
Compare
|
CI gfxreconstruct build queued with queue ID 608306. |
|
CI gfxreconstruct build # 8429 running. |
Also move current block index into ParsedBlock and reduce block_index state duplication.
|
CI gfxreconstruct build # 8429 aborted. |
6eace0e to
1be0eba
Compare
|
CI gfxreconstruct build queued with queue ID 608333. |
|
CI gfxreconstruct build # 8430 running. |
|
CI gfxreconstruct build # 8430 passed. |
Also move current block index into ParsedBlock and reduce block_index state duplication.
These changes are made to support the changes for PR #2543
This PR is dependent on planned changes to file processing.