mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Send pgraph writes to the right classes. Implement grobj reading. Fix class execution functions
This commit is contained in:
@@ -41,6 +41,33 @@
|
||||
// CLass names for debugging
|
||||
extern const char* nv3_class_names[];
|
||||
|
||||
/* Defines valid classes. */
|
||||
typedef enum nv3_pgraph_class_e
|
||||
{
|
||||
nv3_pgraph_class01_beta_factor = 0x01,
|
||||
nv3_pgraph_class02_rop = 0x02,
|
||||
nv3_pgraph_class03_chroma_key = 0x03,
|
||||
nv3_pgraph_class04_plane_mask = 0x04,
|
||||
nv3_pgraph_class05_clipping_rectangle = 0x05,
|
||||
nv3_pgraph_class06_pattern = 0x06,
|
||||
nv3_pgraph_class07_rectangle = 0x07,
|
||||
nv3_pgraph_class08_point = 0x08,
|
||||
nv3_pgraph_class09_line = 0x09,
|
||||
nv3_pgraph_class0a_lin = 0x0a,
|
||||
nv3_pgraph_class0b_triangle = 0x0b,
|
||||
nv3_pgraph_class0c_w95txt = 0x0c,
|
||||
nv3_pgraph_class0d_m2mf = 0x0d,
|
||||
nv3_pgraph_class0e_scaled_image_from_memory = 0x0e,
|
||||
nv3_pgraph_class10_blit = 0x10,
|
||||
nv3_pgraph_class11_image = 0x11,
|
||||
nv3_pgraph_class12_bitmap = 0x12,
|
||||
nv3_pgraph_class14_transfer2memory = 0x14,
|
||||
nv3_pgraph_class15_stretched_image_from_cpu = 0x15,
|
||||
nv3_pgraph_class17_d3d5tri_zeta_buffer = 0x17,
|
||||
nv3_pgraph_class18_point_zeta_buffer = 0x18,
|
||||
nv3_pgraph_class1c_image_in_memory = 0x1c,
|
||||
} nv3_pgraph_class;
|
||||
|
||||
/* Class context switch method */
|
||||
typedef struct nv3_class_ctx_switch_method_s
|
||||
{
|
||||
@@ -1116,29 +1143,29 @@ typedef struct nv3_grobj_s
|
||||
#define NV3_SUBCHANNEL_PIO_ALWAYS_ZERO_END 0x0017
|
||||
|
||||
// Class methods
|
||||
void nv3_generic_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_001_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_002_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_003_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_004_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_005_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_006_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_007_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_008_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_009_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_00a_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_00b_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_00c_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_00d_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_00e_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_010_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_011_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_012_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_014_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_015_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_017_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_018_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_class_01c_method(uint32_t method_id, nv3_grobj_t grobj);
|
||||
void nv3_generic_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_001_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_002_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_003_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_004_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_005_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_006_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_007_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_008_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_009_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_00a_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_00b_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_00c_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_00d_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_00e_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_010_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_011_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_012_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_014_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_015_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_017_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_018_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
void nv3_class_01c_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj);
|
||||
|
||||
// This area is used for holding universal representations of the U* registers...
|
||||
extern struct nv3_object_class_001 nv3_beta_factor;
|
||||
|
||||
@@ -1086,6 +1086,7 @@ typedef struct nv3_pgraph_status_s
|
||||
|
||||
} nv3_pgraph_status_t;
|
||||
|
||||
|
||||
// Graphics Subsystem
|
||||
typedef struct nv3_pgraph_s
|
||||
{
|
||||
@@ -1454,7 +1455,7 @@ void nv3_pgraph_init();
|
||||
uint32_t nv3_pgraph_read(uint32_t address);
|
||||
void nv3_pgraph_write(uint32_t address, uint32_t value);
|
||||
void nv3_pgraph_vblank_start(svga_t* svga);
|
||||
void nv3_pgraph_submit(uint8_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, uint32_t context);
|
||||
void nv3_pgraph_submit(uint32_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, nv3_ramin_context_t context);
|
||||
|
||||
|
||||
// NV3 PFIFO
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_001 beta_factor;
|
||||
|
||||
void nv3_class_001_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_001_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_002 nv3_rop;
|
||||
|
||||
void nv3_class_002_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_002_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_003 nv3_chroma_key;
|
||||
|
||||
void nv3_class_003_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_003_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_004 nv3_plane_mask;
|
||||
|
||||
void nv3_class_004_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_004_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
struct nv3_object_class_005 nv3_clipping_rectangle;
|
||||
|
||||
void nv3_class_005_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_005_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_006 nv3_pattern;
|
||||
|
||||
void nv3_class_006_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_006_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_007 nv3_rectangle;
|
||||
|
||||
void nv3_class_007_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_007_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_008 nv3_point;
|
||||
|
||||
void nv3_class_008_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_008_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_009 nv3_line;
|
||||
|
||||
void nv3_class_009_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_009_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
struct nv3_object_class_00A nv3_lin;
|
||||
|
||||
void nv3_class_00a_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_00a_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_00B nv3_triangle;
|
||||
|
||||
void nv3_class_00b_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_00b_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_00C nv3_win95_gdi_text;
|
||||
|
||||
void nv3_class_00c_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_00c_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_00D nv3_m2mf;
|
||||
|
||||
void nv3_class_00d_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_00d_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_00E nv3_scaled_image_from_mem;
|
||||
|
||||
void nv3_class_00e_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_00e_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_010 nv3_blit;
|
||||
|
||||
void nv3_class_010_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_010_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_011 nv3_image;
|
||||
|
||||
void nv3_class_011_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_011_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
struct nv3_object_class_012 nv3_bitmap;
|
||||
|
||||
void nv3_class_012_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_012_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
struct nv3_object_class_014 nv3_transfer2memory;
|
||||
|
||||
void nv3_class_014_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_014_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_015 nv3_stretched_image_from_cpu;
|
||||
|
||||
void nv3_class_015_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_015_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_017 nv3_d3d5_tri;
|
||||
|
||||
void nv3_class_017_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_017_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_018 nv3_d3d5_point_zeta_buffer;
|
||||
|
||||
void nv3_class_018_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_018_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
struct nv3_object_class_01C nv3_image_in_memory;
|
||||
|
||||
void nv3_class_01c_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_class_01c_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <86box/nv/vid_nv3.h>
|
||||
#include <86box/nv/classes/vid_nv3_classes.h>
|
||||
|
||||
void nv3_generic_method(uint32_t method_id, nv3_grobj_t grobj)
|
||||
void nv3_generic_method(uint32_t name, uint32_t method_id, nv3_ramin_context_t context, nv3_grobj_t grobj)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -709,9 +709,13 @@ void nv3_pfifo_cache0_pull()
|
||||
nv3->pfifo.cache0_settings.get_address ^= 0x04;
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
nv_log("***** SUBMITTING GRAPHICS COMMANDS CURRENTLY UNIMPLEMENTED - CACHE0 PULLED ****** Contextual information below\n");
|
||||
nv_log("***** DEBUG: CACHE0 PULLED ****** Contextual information below\n");
|
||||
|
||||
nv3_debug_ramin_print_context_info(current_name, *(nv3_ramin_context_t*)¤t_context);
|
||||
nv3_ramin_context_t context_structure = *(nv3_ramin_context_t*)¤t_context;
|
||||
|
||||
nv3_debug_ramin_print_context_info(current_name, context_structure);
|
||||
|
||||
nv3_pgraph_submit(current_name, current_method, current_channel, current_subchannel, class_id & 0x1F, context_structure);
|
||||
#endif
|
||||
|
||||
}
|
||||
@@ -876,9 +880,11 @@ void nv3_pfifo_cache1_pull()
|
||||
nv3->pfifo.cache1_settings.get_address = nv3_pfifo_cache1_normal2gray(next_get_address) << 2;
|
||||
|
||||
#ifndef RELEASE_BUILD
|
||||
nv_log("***** OBJECT PULLED, SUBMITTING GRAPHICS COMMANDS CURRENTLY UNIMPLEMENTED - ****** Contextual information below\n");
|
||||
|
||||
nv3_debug_ramin_print_context_info(current_name, *(nv3_ramin_context_t*)¤t_context);
|
||||
nv3_ramin_context_t context_structure = *(nv3_ramin_context_t*)¤t_context;
|
||||
|
||||
nv3_debug_ramin_print_context_info(current_name, context_structure);
|
||||
|
||||
nv3_pgraph_submit(current_name, current_method, current_channel, current_subchannel, class_id & 0x1F, context_structure);
|
||||
#endif
|
||||
|
||||
//Todo: finish it
|
||||
|
||||
@@ -468,16 +468,98 @@ void nv3_pgraph_vblank_start(svga_t* svga)
|
||||
nv3_pgraph_interrupt_valid(NV3_PGRAPH_INTR_EN_0_VBLANK);
|
||||
}
|
||||
|
||||
void nv3_pgraph_arbitrate_method(uint8_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, uint32_t context)
|
||||
/* Sends off method execution to the right class */
|
||||
void nv3_pgraph_arbitrate_method(uint32_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, nv3_ramin_context_t context)
|
||||
{
|
||||
/* Obtain the grobj information from the context in ramin */
|
||||
nv3_grobj_t grobj = {0};
|
||||
|
||||
grobj.grobj_0 = nv3_ramin_read32(context.ramin_offset, nv3);
|
||||
grobj.grobj_1 = nv3_ramin_read32(context.ramin_offset + 4, nv3);
|
||||
grobj.grobj_2 = nv3_ramin_read32(context.ramin_offset + 8, nv3);
|
||||
grobj.grobj_3 = nv3_ramin_read32(context.ramin_offset + 12, nv3);
|
||||
|
||||
nv_log("**** About to execute method **** obj name=0x%08x, method=0x%04x, channel=%d.%d, class=%s, grobj=0x%08x 0x%08x 0x%08x 0x%08x",
|
||||
name, method, channel, subchannel, nv3_class_names[class_id], grobj.grobj_0, grobj.grobj_1, grobj.grobj_2, grobj.grobj_3);
|
||||
|
||||
// By this point, we already ANDed the class ID to 0x1F.
|
||||
// Send the grobj, the context, the method and the name off to actually be acted upon.
|
||||
switch (class_id)
|
||||
{
|
||||
|
||||
case nv3_pgraph_class01_beta_factor:
|
||||
nv3_class_001_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class02_rop:
|
||||
nv3_class_002_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class03_chroma_key:
|
||||
nv3_class_003_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class04_plane_mask:
|
||||
nv3_class_004_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class05_clipping_rectangle:
|
||||
nv3_class_005_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class06_pattern:
|
||||
nv3_class_006_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class07_rectangle:
|
||||
nv3_class_007_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class08_point:
|
||||
nv3_class_008_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class09_line:
|
||||
nv3_class_009_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class0a_lin:
|
||||
nv3_class_00a_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class0b_triangle:
|
||||
nv3_class_00b_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class0c_w95txt:
|
||||
nv3_class_00c_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class0d_m2mf:
|
||||
nv3_class_00d_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class0e_scaled_image_from_memory:
|
||||
nv3_class_00e_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class10_blit:
|
||||
nv3_class_010_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class11_image:
|
||||
nv3_class_011_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class12_bitmap:
|
||||
nv3_class_012_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class14_transfer2memory:
|
||||
nv3_class_014_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class15_stretched_image_from_cpu:
|
||||
nv3_class_015_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class17_d3d5tri_zeta_buffer:
|
||||
nv3_class_017_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class18_point_zeta_buffer:
|
||||
nv3_class_018_method(name, method, context, grobj);
|
||||
break;
|
||||
case nv3_pgraph_class1c_image_in_memory:
|
||||
nv3_class_01c_method(name, method, context, grobj);
|
||||
break;
|
||||
default:
|
||||
fatal("NV3 (nv3_pgraph_arbitrate_method): Attempted to execute method on invalid, or unimplemented, class ID %s", nv3_class_names[class_id]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Arbitrates graphics object submission to the right object types */
|
||||
void nv3_pgraph_submit(uint8_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, uint32_t context)
|
||||
void nv3_pgraph_submit(uint32_t name, uint16_t method, uint8_t channel, uint8_t subchannel, uint8_t class_id, nv3_ramin_context_t context)
|
||||
{
|
||||
// class id can be derived from the context but we debug log it before we get here
|
||||
// Do we need to read grobj here?
|
||||
|
||||
@@ -507,7 +507,7 @@ void nv3_debug_ramin_print_context_info(uint32_t name, nv3_ramin_context_t conte
|
||||
|
||||
nv_log("Context:\n");
|
||||
nv_log("DMA Channel %d (0-7 valid)\n", context.channel);
|
||||
nv_log("Class ID: as repreesnted in ramin=%04x, Stupid 5 bit version (the actual id)=0x%04x (%s)\n", context.class_id,
|
||||
nv_log("Class ID: as represented in ramin=%04x, Stupid 5 bit version (the actual id)=0x%04x (%s)\n", context.class_id,
|
||||
context.class_id & 0x1F, nv3_class_names[context.class_id & 0x1F]);
|
||||
nv_log("Render Engine %d (0=Software, also DMA? 1=Accelerated Renderer)\n", context.is_rendering);
|
||||
nv_log("PRAMIN Offset 0x%08x\n", context.ramin_offset << 4);
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
|
||||
uint32_t nv3_ramfc_read(uint32_t address)
|
||||
{
|
||||
nv_log("RAMFC (Unused DMA channel context) Read (0x%04x), UNIMPLEMENTED - RETURNING 0x00\n", address);
|
||||
nv_log("RAMFC (Unused DMA channel context) Read (0x%04x)), I DON'T BELIEVE THIS SHOULD EVER HAPPEN - RETURNING 0x00\n", address);
|
||||
}
|
||||
|
||||
void nv3_ramfc_write(uint32_t address, uint32_t value)
|
||||
{
|
||||
nv_log("RAMFC (Unused DMA channel context) Write (0x%04x -> 0x%04x), UNIMPLEMENTED\n", value, address);
|
||||
nv_log("RAMFC (Unused DMA channel context) Write (0x%04x -> 0x%04x)), I DON'T BELIEVE THIS SHOULD EVER HAPPEN\n", value, address);
|
||||
}
|
||||
@@ -47,10 +47,10 @@ uint32_t nv3_ramht_hash(uint32_t name, uint32_t channel)
|
||||
|
||||
uint32_t nv3_ramht_read(uint32_t address)
|
||||
{
|
||||
nv_log("RAMHT (Graphics object storage hashtable) Read (0x%04x), UNIMPLEMENTED - RETURNING 0x00\n", address);
|
||||
nv_log("RAMHT (Graphics object storage hashtable) Read (0x%04x), I DON'T BELIEVE THIS SHOULD EVER HAPPEN - RETURNING 0x00\n", address);
|
||||
}
|
||||
|
||||
void nv3_ramht_write(uint32_t address, uint32_t value)
|
||||
{
|
||||
nv_log("RAMHT (Graphics object storage hashtable) Write (0x%04x -> 0x%04x), UNIMPLEMENTED\n", value, address);
|
||||
nv_log("RAMHT (Graphics object storage hashtable) Write (0x%04x -> 0x%04x), I DON'T BELIEVE THIS SHOULD EVER HAPPEN - UNIMPLEMENTED\n", value, address);
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
|
||||
uint32_t nv3_ramro_read(uint32_t address)
|
||||
{
|
||||
nv_log("RAM Runout (invalid dma object submission) Read (0x%04x), UNIMPLEMENTED - RETURNING 0x00\n", address);
|
||||
nv_log("RAM Runout (invalid dma object submission) Read (0x%04x), I DON'T BELIEVE THIS SHOULD EVER HAPPEN\n", address);
|
||||
}
|
||||
|
||||
void nv3_ramro_write(uint32_t address, uint32_t value)
|
||||
{
|
||||
nv_log("RAM Runout WRITE, OH CRAP!!!! (0x%04x -> 0x%04x), UNIMPLEMENTED\n (Todo: Read the entries...)\n", value, address);
|
||||
nv_log("RAM Runout WRITE, OH CRAP!!!! (0x%04x -> 0x%04x), I DON'T BELIEVE THIS SHOULD EVER HAPPEN\n", value, address);
|
||||
}
|
||||
|
||||
void nv3_ramro_send()
|
||||
|
||||
Reference in New Issue
Block a user