Skip to content

Commit 801942f

Browse files
committed
Update source code for RMV v1.6.1 release
1 parent 2a91cef commit 801942f

File tree

9 files changed

+93
-15
lines changed

9 files changed

+93
-15
lines changed

Release_Notes.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
Radeon™ Memory Visualizer V1.6 04-26-2023
2-
-----------------------------------------
1+
Radeon™ Memory Visualizer V1.6.1 05-24-2023
2+
-------------------------------------------
33

4-
V1.6 Changes
4+
V1.6.1 Changes
55
------------------------------------
6-
1) Additional parameters added to the resource history table in the resource details pane.
7-
2) Improved Device configuration reporting with newer trace files, including CPU and driver information.
8-
3) Bug/stability fixes.
6+
1) Add support for an upcoming driver release.
7+
2) Bug/stability fixes.
98

109
Known Issues
1110
------------------------------------
@@ -25,6 +24,12 @@ Known Issues
2524
Release Notes History
2625
------------------------------------
2726

27+
V1.6 Changes
28+
------------------------------------
29+
1) Additional parameters added to the resource history table in the resource details pane.
30+
2) Improved Device configuration reporting with newer trace files, including CPU and driver information.
31+
3) Bug/stability fixes.
32+
2833
V1.5 Changes
2934
------------------------------------
3035
1) Keyboard shortcuts added for all panes on the Welcome and Settings lists. Some keys have also been remapped to avoid conflict with the Adrenaline software. See the documentation or keyboard shortcuts pane for details.

documentation/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
# built documents.
5555
#
5656
# The short X.Y version.
57-
version = u'1.6.0'
57+
version = u'1.6.1'
5858
# The full version, including alpha/beta/rc tags.
59-
release = u'1.6.0'
59+
release = u'1.6.1'
6060

6161
# The language for content autogenerated by Sphinx. Refer to documentation
6262
# for a list of supported languages.

source/backend/rmt_rdf_file_parser.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ static RmtErrorCode LoadSnapshotChunks(rdfChunkFile* chunk_file, RmtDataSet* dat
7676
// Load each of the Snapshot Info chunks using the indices found in the Snapshot Index chunk and copy to the data set.
7777
for (uint16_t snapshot_info_chunk_index : *indices)
7878
{
79-
StoreSnapshotToDataSet(*chunk_file, snapshot_info_chunk, snapshot_info_chunk_index, *data_set);
79+
if (snapshot_info_chunk_index != kEmptySnapshotIndexChunk)
80+
{
81+
StoreSnapshotToDataSet(*chunk_file, snapshot_info_chunk, snapshot_info_chunk_index, *data_set);
82+
}
8083
}
8184
}
8285
}

source/backend/rmt_rdf_snapshot_writer.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,24 @@ RmtErrorCode RmtRdfSnapshotWriter::Remove(const uint16_t removed_snapshot_index)
159159
{
160160
std::vector<int16_t> indices;
161161
std::string chunk_indices_string;
162-
indices.reserve(data_set_->snapshot_count);
163-
for (int16_t snapshot_index = 0; snapshot_index < data_set_->snapshot_count; snapshot_index++)
162+
163+
// NOTE: The snapshot count isn't decremented until after the remove operation completes so the count will be one here if the last snapshot is being deleted.
164+
if (data_set_->snapshot_count > 1)
164165
{
165-
// Skip snapshots with an empty name.
166-
if (data_set_->snapshots[snapshot_index].name[0] != '\0')
166+
indices.reserve(data_set_->snapshot_count);
167+
for (int16_t snapshot_index = 0; snapshot_index < data_set_->snapshot_count; snapshot_index++)
167168
{
168-
indices.push_back(data_set_->snapshots[snapshot_index].chunk_index);
169+
// Skip snapshots with an empty name.
170+
if (data_set_->snapshots[snapshot_index].name[0] != '\0')
171+
{
172+
indices.push_back(data_set_->snapshots[snapshot_index].chunk_index);
173+
}
169174
}
170175
}
176+
else
177+
{
178+
indices.push_back(kEmptySnapshotIndexChunk);
179+
}
171180

172181
// Populate the header for the snapshot index chunk.
173182
RmtRdfSnapshotIndex::TraceSnapShotIndexHeader header;

source/backend/rmt_rdf_snapshot_writer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515

1616
#include "rdf/rdf/inc/amdrdf.h"
1717

18+
#include <stdint.h>
19+
1820
constexpr const char* kSnapshotIndexChunkId = "RmvSnapshotIndex";
1921

22+
// A dummy index that indicates there are no snapshots in the file.
23+
static const uint16_t kEmptySnapshotIndexChunk = UINT16_MAX;
24+
2025
// A class that handles writing snapshot data to RDF trace files.
2126
class RmtRdfSnapshotWriter : public RmtSnapshotWriter
2227
{

source/parser/rmt_format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static const int kRmtRdfResultSuccess = 1;
4242
typedef enum RmtTokenType
4343
{
4444
kRmtTokenTypeTimestamp = 0, ///< The token is a timestamp token.
45-
kRmtTokenTypeReserved0 = 1, ///< The token is reserved
45+
kRmtTokenTypeResourceUpdate = 1, ///< The token is a resource update token.
4646
kRmtTokenTypeReserved1 = 2, ///< The token is reserved
4747
kRmtTokenTypePageTableUpdate = 3, ///< The token is a page table update token.
4848
kRmtTokenTypeUserdata = 4, ///< The token is a user data token.

source/parser/rmt_parser.cpp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#define RMT_TOKEN_SIZE_VIRTUAL_ALLOCATE (96 / 8) ///< Virtual Allocate Token Size, in bytes
3131
#define RMT_TOKEN_SIZE_RESOURCE_CREATE (56 / 8) ///< Resource Create Token Size, in bytes
3232
#define RMT_TOKEN_SIZE_RESOURCE_DESTROY (40 / 8) ///< Resource Destroy Token Size, in bytes
33+
#define RMT_TOKEN_SIZE_RESOURCE_UPDATE (112 / 8) ///< Resource Update Token Size, in bytes
3334

3435
#define IMAGE_RESOURCE_TOKEN_SIZE (304 / 8) ///< Image Resource Token Size
3536
#define IMAGE_RESOURCE_TOKEN_SIZE_V1_6 (312 / 8) ///< Image Resource Token Size for V1.6 onwards
@@ -441,6 +442,10 @@ static int32_t GetTokenSize(RmtParser* rmt_parser, const uint16_t token_header)
441442
}
442443
case kRmtTokenTypeResourceDestroy:
443444
return RMT_TOKEN_SIZE_RESOURCE_DESTROY;
445+
446+
case kRmtTokenTypeResourceUpdate:
447+
return RMT_TOKEN_SIZE_RESOURCE_UPDATE;
448+
444449
default:
445450
RMT_ASSERT(false);
446451

@@ -1387,6 +1392,38 @@ static RmtErrorCode ParseResourceDestroy(RmtParser* rmt_parser, const uint16_t t
13871392
return kRmtOk;
13881393
}
13891394

1395+
// parse resource update
1396+
static RmtErrorCode ParseResourceUpdate(RmtParser* rmt_parser,
1397+
const uint16_t token_header,
1398+
RmtTokenResourceUpdate* out_resource_update)
1399+
{
1400+
RMT_UNUSED(token_header);
1401+
1402+
PopulateCommonFields(rmt_parser, &out_resource_update->common);
1403+
1404+
uint8_t data[RMT_TOKEN_SIZE_RESOURCE_UPDATE];
1405+
RmtErrorCode error_code = ReadBytes(rmt_parser, data, 0, sizeof(data));
1406+
1407+
RMT_RETURN_ON_ERROR(error_code == kRmtOk, error_code);
1408+
1409+
out_resource_update->resource_identifier = ReadBitsFromBuffer(data, sizeof(data), 39, 8);
1410+
out_resource_update->subresource_id = (uint32_t)ReadBitsFromBuffer(data, sizeof(data), 71, 40);
1411+
out_resource_update->resource_type = (RmtResourceType)ReadBitsFromBuffer(data, sizeof(data), 77, 72);
1412+
// Resource types can be anything, but for now, the driver is only going to log buffers:
1413+
RMT_ASSERT(out_resource_update->resource_type == kRmtResourceTypeBuffer);
1414+
// Buffers should always be cleared with 0xFFFFFFFF. Maybe there is a valid case where this could be something else...
1415+
RMT_ASSERT(out_resource_update->subresource_id == 0xffffffff);
1416+
1417+
// The DX12 resource transition API provides the state before and after the transition. The driver converts
1418+
// them to the relevant RMT usage flags and stores them in the 'before' and 'after' fields.
1419+
// Since we are only concerned with buffers right now, these flags will be of type
1420+
// RMT_BUFFER_USAGE_FLAGS (aka RmtBufferUsageFlagBits):
1421+
out_resource_update->before = ReadBitsFromBuffer(data, sizeof(data), 92, 78);
1422+
out_resource_update->after = ReadBitsFromBuffer(data, sizeof(data), 107, 93);
1423+
1424+
return kRmtOk;
1425+
}
1426+
13901427
RmtErrorCode RmtParserInitialize(RmtParser* rmt_parser,
13911428
FILE* file_handle,
13921429
int32_t file_offset,
@@ -1541,6 +1578,9 @@ RmtErrorCode RmtParserAdvance(RmtParser* rmt_parser, RmtToken* out_token, RmtPar
15411578
case kRmtTokenTypeResourceDestroy:
15421579
error_code = ParseResourceDestroy(rmt_parser, token_header, &out_token->resource_destroy_token);
15431580
break;
1581+
case kRmtTokenTypeResourceUpdate:
1582+
error_code = ParseResourceUpdate(rmt_parser, token_header, &out_token->resource_update_token);
1583+
break;
15441584
default:
15451585
RMT_ASSERT(0);
15461586
error_code = kRmtErrorMalformedData; // corrupted file.

source/parser/rmt_token.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ void RmtTokenCopy(RmtToken* dest, const RmtToken* src)
141141
memcpy(&dest->virtual_free_token, &src->virtual_free_token, sizeof(RmtTokenVirtualFree));
142142
break;
143143

144+
case RmtTokenType::kRmtTokenTypeResourceUpdate:
145+
memcpy(&dest->resource_update_token, &src->resource_update_token, sizeof(RmtTokenResourceUpdate));
146+
break;
147+
144148
default:
145149
break;
146150
}

source/parser/rmt_token.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ typedef struct RmtTokenResourceDestroy
182182
RmtResourceIdentifier resource_identifier; ///< A unique identifier for the resource being unbound.
183183
} RmtTokenResourceDestroy;
184184

185+
/// A structure for a resource update
186+
typedef struct RmtTokenResourceUpdate
187+
{
188+
RmtTokenCommon common; ///< Fields common to all tokens.
189+
RmtResourceIdentifier resource_identifier; ///< Resource ID
190+
uint32_t subresource_id; ///< Subresource ID
191+
RmtResourceType resource_type; ///< Type of resource being updated
192+
uint64_t before; ///< Usage flags before
193+
uint64_t after; ///< Usage flags after
194+
} RmtTokenResourceUpdate;
195+
185196
/// A structure encapsulating the token.
186197
typedef struct RmtToken
187198
{
@@ -204,6 +215,7 @@ typedef struct RmtToken
204215
RmtTokenResourceCreate resource_create_token; ///< Valid when <c><i>type</i></c> is <c><i>kRmtTokenTypeResourceCreate</i></c>.
205216
RmtTokenTimeDelta time_delta_token; ///< Valid when <c><i>type</i></c> is <c><i>kRmtTokenTypeTimeDelta</i></c>.
206217
RmtTokenResourceDestroy resource_destroy_token; ///< Valid when <c><i>type</i></c> is <c><i>kRmtTokenTypeResourceDestroy</i></c>.
218+
RmtTokenResourceUpdate resource_update_token; ///< Valid when <c><i>type</i></c> is <c><i>kRmtTokenTypeResourceUpdate</i></c>.
207219
};
208220

209221
} RmtToken;

0 commit comments

Comments
 (0)