-
Notifications
You must be signed in to change notification settings - Fork 123
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
Vulkan dump resources: Option to dump alpha separately #1883
Vulkan dump resources: Option to dump alpha separately #1883
Conversation
CI gfxreconstruct build queued with queue ID 308731. |
CI gfxreconstruct build # 5376 running. |
CI gfxreconstruct build # 5376 failed. |
035e2c3
to
c6dd4a6
Compare
CI gfxreconstruct build queued with queue ID 308753. |
CI gfxreconstruct build # 5377 running. |
CI gfxreconstruct build # 5377 passed. |
if (filename_before != nullptr) | ||
{ | ||
json_entry["beforeFile"] = *filename_before; | ||
json_entry["beforeFile-alpha"] = util::filepath::InsertFilenamePostfix(*filename_before, "_alpha"); |
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.
Could we change the -alpha attributes to follow the same naming rules as the other attributes,
say using "beforeFileAlpha", "afterFileAlpha", etc.
using a "-" does make attributes names slightly uglier to use in javascript, basically simple identifiers cannot have a - (I could handle it, but I think we should just use snakeCase here as well, just as we do for all the other attributes.
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.
sure
c6dd4a6
to
1b41390
Compare
CI gfxreconstruct build queued with queue ID 309676. |
CI gfxreconstruct build # 5388 running. |
CI gfxreconstruct build # 5388 passed. |
CI gfxreconstruct build queued with queue ID 310069. |
CI gfxreconstruct build # 5396 running. |
framework/util/image_writer.cpp
Outdated
@@ -96,6 +97,15 @@ static size_t temporary_buffer_size = 0; | |||
} \ | |||
} | |||
|
|||
static void ResizeTemoraryBuffer(size_t new_size) |
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.
Could the temporary be vector<uint8_t>
and then you can use resize
?
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.
That is to say, you could call resize
instead of calling this function.
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.
sure
framework/util/image_writer.cpp
Outdated
@@ -331,6 +334,73 @@ static const uint8_t* ConvertIntoTemporaryBuffer(uint32_t width, | |||
return reinterpret_cast<const uint8_t*>(temporary_buffer.get()); | |||
} | |||
|
|||
static uint8_t* ExtractAlphaChannel(uint32_t width, uint32_t height, const void* data, uint32_t data_pitch, bool is_png) |
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.
Could this be expand_to_rgb
and invert the sense of the comparison? I'd like if possible for parameters to generally express the lowest meaningful thing; if we were to add another luminance-capable image then a future reader would need to guess is_png
means "can have one-channel encoding".
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.
sure
CI gfxreconstruct build # 5396 passed. |
CI gfxreconstruct build queued with queue ID 310963. |
CI gfxreconstruct build # 5410 running. |
CI gfxreconstruct build # 5410 failed. |
cfcb990
to
2ab8465
Compare
CI gfxreconstruct build queued with queue ID 311383. |
CI gfxreconstruct build # 5419 running. |
CI gfxreconstruct build # 5419 passed. |
Works for me :-). |
CI gfxreconstruct build queued with queue ID 312153. |
New option --dump-resources-dump-separate-alpha will force the alpha channel of dumped images to be dumped into a separate file
4f0e975
to
b3f135e
Compare
CI gfxreconstruct build queued with queue ID 312155. |
CI gfxreconstruct build # 5441 running. |
CI gfxreconstruct build # 5441 passed. |
New option --dump-resources-dump-separate-alpha will force the alpha channel of dumped images to be dumped into a separate file