nouveau: Generate 3D headers

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Faith Ekstrand 2023-01-30 20:11:52 -06:00 committed by Marge Bot
parent b3531276c6
commit 0f203b2b44
3 changed files with 46 additions and 2 deletions

View file

@ -5,12 +5,19 @@ idep_nvidia_headers = declare_dependency(
nvk_classes = [
'cl902d',
'cl906f',
'cl9097',
'cl90b5',
'cla0b5',
'cla097',
'clb097',
'clb197',
'clc097',
'clc1b5',
'cla0c0',
'clc0c0',
'clc3c0'
'clc397',
'clc3c0',
'clc597',
]
nvk_cl_header_depend_files = [

View file

@ -10,13 +10,18 @@
#include "nouveau_context.h"
#include "nvtypes.h"
#include "nvk_cl9097.h"
#include "nvk_cl902d.h"
#include "nvk_cl90b5.h"
#include "nvk_cla097.h"
#include "nvk_cla0b5.h"
#include "nvk_clc1b5.h"
#include "nvk_cla0c0.h"
#include "nvk_clb197.h"
#include "nvk_clc0c0.h"
#include "nvk_clc1b5.h"
#include "nvk_clc397.h"
#include "nvk_clc3c0.h"
#include "nvk_clc597.h"
struct nouveau_ws_push*
nouveau_ws_push_new(struct nouveau_ws_device *dev, uint64_t size)
@ -144,6 +149,18 @@ nouveau_ws_push_dump(struct nouveau_ws_push *push, struct nouveau_ws_context *ct
while (count--) {
const char *mthd_name = "";
switch (subchan) {
case 0:
if (ctx->compute.cls >= 0xc597)
mthd_name = P_PARSE_NVC597_MTHD(mthd);
else if (ctx->compute.cls >= 0xc397)
mthd_name = P_PARSE_NVC397_MTHD(mthd);
else if (ctx->compute.cls >= 0xb197)
mthd_name = P_PARSE_NVB197_MTHD(mthd);
else if (ctx->compute.cls >= 0xa097)
mthd_name = P_PARSE_NVA097_MTHD(mthd);
else
mthd_name = P_PARSE_NV9097_MTHD(mthd);
break;
case 1:
if (ctx->compute.cls >= 0xc3c0)
mthd_name = P_PARSE_NVC3C0_MTHD(mthd);
@ -173,6 +190,18 @@ nouveau_ws_push_dump(struct nouveau_ws_push *push, struct nouveau_ws_context *ct
printf("\tmthd %04x %s\n", mthd, mthd_name);
switch (subchan) {
case 0:
if (ctx->compute.cls >= 0xc597)
P_DUMP_NVC597_MTHD_DATA(mthd, value, "\t\t");
else if (ctx->compute.cls >= 0xc397)
P_DUMP_NVC397_MTHD_DATA(mthd, value, "\t\t");
else if (ctx->compute.cls >= 0xb197)
P_DUMP_NVB197_MTHD_DATA(mthd, value, "\t\t");
else if (ctx->compute.cls >= 0xa097)
P_DUMP_NVA097_MTHD_DATA(mthd, value, "\t\t");
else
P_DUMP_NV9097_MTHD_DATA(mthd, value, "\t\t");
break;
case 1:
if (ctx->compute.cls >= 0xc3c0)
P_DUMP_NVC3C0_MTHD_DATA(mthd, value, "\t\t");

View file

@ -33,6 +33,14 @@ unsigned nouveau_ws_push_num_refs(const struct nouveau_ws_push *push);
void nouveau_ws_push_reset_refs(struct nouveau_ws_push *push,
unsigned num_refs);
#define SUBC_NV9097 0
#define SUBC_NVA097 0
#define SUBC_NVB097 0
#define SUBC_NVB197 0
#define SUBC_NVC097 0
#define SUBC_NVC397 0
#define SUBC_NVC597 0
#define SUBC_NVA0C0 1
#define SUBC_NVC0C0 1
#define SUBC_NVC3C0 1