early-access version 3197
This commit is contained in:
@@ -27,7 +27,7 @@ void DrawManager::ProcessMethodCall(u32 method, u32 argument) {
|
||||
case MAXWELL3D_REG_INDEX(index_buffer32_subsequent):
|
||||
case MAXWELL3D_REG_INDEX(index_buffer16_subsequent):
|
||||
case MAXWELL3D_REG_INDEX(index_buffer8_subsequent):
|
||||
LOG_WARNING(HW_GPU, "(STUBBED) called, Index_Buffer_Subsequent Draw");
|
||||
draw_state.instance_count++;
|
||||
[[fallthrough]];
|
||||
case MAXWELL3D_REG_INDEX(index_buffer32_first):
|
||||
case MAXWELL3D_REG_INDEX(index_buffer16_first):
|
||||
@@ -70,7 +70,7 @@ void DrawManager::DrawArray(PrimitiveTopology topology, u32 vertex_first, u32 ve
|
||||
draw_state.topology = topology;
|
||||
draw_state.vertex_buffer.first = vertex_first;
|
||||
draw_state.vertex_buffer.count = vertex_count;
|
||||
draw_state.base_insance = base_instance;
|
||||
draw_state.base_instance = base_instance;
|
||||
ProcessDraw(false, num_instances);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void DrawManager::DrawIndex(PrimitiveTopology topology, u32 index_first, u32 ind
|
||||
draw_state.index_buffer.first = index_first;
|
||||
draw_state.index_buffer.count = index_count;
|
||||
draw_state.base_index = base_index;
|
||||
draw_state.base_insance = base_instance;
|
||||
draw_state.base_instance = base_instance;
|
||||
ProcessDraw(true, num_instances);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ void DrawManager::DrawEnd(u32 instance_count, bool force_draw) {
|
||||
break;
|
||||
[[fallthrough]];
|
||||
case DrawMode::General:
|
||||
draw_state.base_insance = regs.global_base_instance_index;
|
||||
draw_state.base_instance = regs.global_base_instance_index;
|
||||
draw_state.base_index = regs.global_base_vertex_index;
|
||||
if (draw_state.draw_indexed) {
|
||||
draw_state.index_buffer = regs.index_buffer;
|
||||
@@ -131,7 +131,7 @@ void DrawManager::DrawEnd(u32 instance_count, bool force_draw) {
|
||||
draw_state.draw_indexed = false;
|
||||
break;
|
||||
case DrawMode::InlineIndex:
|
||||
draw_state.base_insance = regs.global_base_instance_index;
|
||||
draw_state.base_instance = regs.global_base_instance_index;
|
||||
draw_state.base_index = regs.global_base_vertex_index;
|
||||
draw_state.index_buffer = regs.index_buffer;
|
||||
draw_state.index_buffer.count =
|
||||
@@ -143,13 +143,15 @@ void DrawManager::DrawEnd(u32 instance_count, bool force_draw) {
|
||||
}
|
||||
}
|
||||
|
||||
void DrawManager::DrawIndexSmall(int argument) {
|
||||
void DrawManager::DrawIndexSmall(u32 argument) {
|
||||
const auto& regs{maxwell3d->regs};
|
||||
draw_state.base_insance = regs.global_base_instance_index;
|
||||
IndexBufferSmall index_small_params{argument};
|
||||
draw_state.base_instance = regs.global_base_instance_index;
|
||||
draw_state.base_index = regs.global_base_vertex_index;
|
||||
draw_state.index_buffer = regs.index_buffer;
|
||||
draw_state.index_buffer.first = argument & 0xffff;
|
||||
draw_state.index_buffer.count = (argument >> 16) & 0xfff;
|
||||
draw_state.index_buffer.first = index_small_params.first;
|
||||
draw_state.index_buffer.count = index_small_params.count;
|
||||
draw_state.topology = index_small_params.topology;
|
||||
maxwell3d->dirty.flags[VideoCommon::Dirty::IndexBuffer] = true;
|
||||
ProcessDraw(true, 1);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ using PrimitiveTopology = Maxwell3D::Regs::PrimitiveTopology;
|
||||
using PrimitiveTopologyOverride = Maxwell3D::Regs::PrimitiveTopologyOverride;
|
||||
using IndexBuffer = Maxwell3D::Regs::IndexBuffer;
|
||||
using VertexBuffer = Maxwell3D::Regs::VertexBuffer;
|
||||
using IndexBufferSmall = Maxwell3D::Regs::IndexBufferSmall;
|
||||
|
||||
class DrawManager {
|
||||
public:
|
||||
@@ -25,7 +26,7 @@ public:
|
||||
u32 base_index{};
|
||||
VertexBuffer vertex_buffer;
|
||||
IndexBuffer index_buffer;
|
||||
u32 base_insance{};
|
||||
u32 base_instance{};
|
||||
u32 instance_count{};
|
||||
std::vector<u8> inline_index_draw_indexes;
|
||||
};
|
||||
@@ -55,7 +56,7 @@ private:
|
||||
|
||||
void DrawEnd(u32 instance_count = 1, bool force_draw = false);
|
||||
|
||||
void DrawIndexSmall(int argument);
|
||||
void DrawIndexSmall(u32 argument);
|
||||
|
||||
void ProcessTopologyOverride();
|
||||
|
||||
|
||||
@@ -2225,6 +2225,7 @@ public:
|
||||
|
||||
struct IndexBufferSmall {
|
||||
union {
|
||||
u32 raw;
|
||||
BitField<0, 16, u32> first;
|
||||
BitField<16, 12, u32> count;
|
||||
BitField<28, 4, PrimitiveTopology> topology;
|
||||
|
||||
Reference in New Issue
Block a user