1
0
Fork 0
forked from suyu/suyu

maxwell_3d: Add dirty flags for depth bounds values

This is useful in Vulkan where we want to update depth bounds without
caring if it's enabled or disabled through vkCmdSetDepthBounds.
This commit is contained in:
ReinUsesLisp 2019-09-29 20:45:12 -03:00
parent e11afeb34d
commit fe7f20e659
2 changed files with 10 additions and 1 deletions

View file

@ -249,6 +249,11 @@ void Maxwell3D::InitDirtySettings() {
dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_units)] = polygon_offset_dirty_reg; dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_units)] = polygon_offset_dirty_reg;
dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_factor)] = polygon_offset_dirty_reg; dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_factor)] = polygon_offset_dirty_reg;
dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_clamp)] = polygon_offset_dirty_reg; dirty_pointers[MAXWELL3D_REG_INDEX(polygon_offset_clamp)] = polygon_offset_dirty_reg;
// Depth bounds
constexpr u32 depth_bounds_values_dirty_reg = DIRTY_REGS_POS(depth_bounds_values);
dirty_pointers[MAXWELL3D_REG_INDEX(depth_bounds[0])] = depth_bounds_values_dirty_reg;
dirty_pointers[MAXWELL3D_REG_INDEX(depth_bounds[1])] = depth_bounds_values_dirty_reg;
} }
void Maxwell3D::CallMacroMethod(u32 method, std::size_t num_parameters, const u32* parameters) { void Maxwell3D::CallMacroMethod(u32 method, std::size_t num_parameters, const u32* parameters) {

View file

@ -687,7 +687,9 @@ public:
u32 rt_separate_frag_data; u32 rt_separate_frag_data;
INSERT_PADDING_WORDS(0xC); f32 depth_bounds[2];
INSERT_PADDING_WORDS(0xA);
struct { struct {
u32 address_high; u32 address_high;
@ -1201,6 +1203,7 @@ public:
bool transform_feedback; bool transform_feedback;
bool color_mask; bool color_mask;
bool polygon_offset; bool polygon_offset;
bool depth_bounds_values;
// Complementary // Complementary
bool viewport_transform; bool viewport_transform;
@ -1400,6 +1403,7 @@ ASSERT_REG_POSITION(stencil_back_mask, 0x3D6);
ASSERT_REG_POSITION(stencil_back_func_mask, 0x3D7); ASSERT_REG_POSITION(stencil_back_func_mask, 0x3D7);
ASSERT_REG_POSITION(color_mask_common, 0x3E4); ASSERT_REG_POSITION(color_mask_common, 0x3E4);
ASSERT_REG_POSITION(rt_separate_frag_data, 0x3EB); ASSERT_REG_POSITION(rt_separate_frag_data, 0x3EB);
ASSERT_REG_POSITION(depth_bounds, 0x3EC);
ASSERT_REG_POSITION(zeta, 0x3F8); ASSERT_REG_POSITION(zeta, 0x3F8);
ASSERT_REG_POSITION(clear_flags, 0x43E); ASSERT_REG_POSITION(clear_flags, 0x43E);
ASSERT_REG_POSITION(vertex_attrib_format, 0x458); ASSERT_REG_POSITION(vertex_attrib_format, 0x458);