Skip to content

Commit

Permalink
Convert now recognizes asset files
Browse files Browse the repository at this point in the history
  • Loading branch information
panos-lunarg committed Sep 6, 2024
1 parent 1b96db7 commit 454ddc2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tools/convert/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
** FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
** DEALINGS IN THE SOFTWARE.
*/
#include <string>
#include PROJECT_VERSION_HEADER_FILE
#include "tool_settings.h"
#include "decode/json_writer.h" /// @todo move to util?
Expand Down Expand Up @@ -173,14 +174,24 @@ int main(int argc, const char** argv)
bool file_per_frame = arg_parser.IsOptionSet(kFilePerFrameOption);
bool output_to_stdout = output_filename == "stdout";

bool is_asset_file = false;
size_t last_dot_pos = input_filename.find_last_of(".");
if (last_dot_pos != std::string::npos)
{
if (!input_filename.compare(last_dot_pos, 5, ".gfxa"))
{
is_asset_file = true;
}
}

gfxrecon::decode::FileProcessor file_processor;

#ifndef D3D12_SUPPORT
bool detected_d3d12 = false;
bool detected_vulkan = false;
gfxrecon::decode::DetectAPIs(input_filename, detected_d3d12, detected_vulkan);

if (!detected_vulkan)
if (!detected_vulkan && !is_asset_file)
{
GFXRECON_LOG_INFO("Capture file does not contain Vulkan content. D3D12 content may be present but "
"gfxrecon-convert is not compiled with D3D12 support.");
Expand Down

0 comments on commit 454ddc2

Please sign in to comment.