Provide custom border color to samplers (#3014)

This commit is contained in:
Marcin Mikołajczyk
2025-05-30 21:04:31 +02:00
committed by GitHub
parent 790b54bf29
commit 4019319d92
6 changed files with 53 additions and 8 deletions

View File

@@ -608,6 +608,16 @@ struct Liverpool {
}
};
struct BorderColorBufferBase {
u32 base_addr_lo;
BitField<0, 8, u32> base_addr_hi;
template <typename T = VAddr>
T Address() const {
return std::bit_cast<T>(u64(base_addr_hi) << 40 | u64(base_addr_lo) << 8);
}
};
struct IndexBufferBase {
BitField<0, 8, u32> base_addr_hi;
u32 base_addr_lo;
@@ -1299,7 +1309,9 @@ struct Liverpool {
Scissor screen_scissor;
INSERT_PADDING_WORDS(0xA010 - 0xA00C - 2);
DepthBuffer depth_buffer;
INSERT_PADDING_WORDS(0xA080 - 0xA018);
INSERT_PADDING_WORDS(8);
BorderColorBufferBase ta_bc_base;
INSERT_PADDING_WORDS(0xA080 - 0xA020 - 2);
WindowOffset window_offset;
ViewportScissor window_scissor;
INSERT_PADDING_WORDS(0xA08E - 0xA081 - 2);
@@ -1626,6 +1638,7 @@ static_assert(GFX6_3D_REG_INDEX(depth_htile_data_base) == 0xA005);
static_assert(GFX6_3D_REG_INDEX(screen_scissor) == 0xA00C);
static_assert(GFX6_3D_REG_INDEX(depth_buffer.z_info) == 0xA010);
static_assert(GFX6_3D_REG_INDEX(depth_buffer.depth_slice) == 0xA017);
static_assert(GFX6_3D_REG_INDEX(ta_bc_base) == 0xA020);
static_assert(GFX6_3D_REG_INDEX(window_offset) == 0xA080);
static_assert(GFX6_3D_REG_INDEX(window_scissor) == 0xA081);
static_assert(GFX6_3D_REG_INDEX(color_target_mask) == 0xA08E);