nouveau/winsys: Add m2mf/compute objects
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "nvtypes.h"
|
||||
#include "classes/cl902d.h"
|
||||
#include "classes/clc5c0.h"
|
||||
|
||||
int
|
||||
nouveau_ws_context_create(struct nouveau_ws_device *dev, struct nouveau_ws_context **out)
|
||||
@@ -29,6 +30,22 @@ nouveau_ws_context_create(struct nouveau_ws_device *dev, struct nouveau_ws_conte
|
||||
if (ret)
|
||||
goto fail_2d;
|
||||
|
||||
uint32_t obj_class = 0xa140;//NVF0_P2MF_CLASS;
|
||||
ret = nouveau_object_new((*out)->channel, 0xbeef323f, obj_class, NULL, 0,
|
||||
&(*out)->m2mf);
|
||||
if (ret) {
|
||||
FREE(*out);
|
||||
return ret;
|
||||
}
|
||||
|
||||
obj_class = TURING_COMPUTE_A;
|
||||
ret = nouveau_object_new((*out)->channel, 0xbeef00c0, obj_class, NULL, 0,
|
||||
&(*out)->compute);
|
||||
if (ret) {
|
||||
FREE(*out);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail_2d:
|
||||
|
||||
@@ -9,6 +9,8 @@ struct nouveau_ws_context {
|
||||
struct nouveau_object *channel;
|
||||
|
||||
struct nouveau_object *eng2d;
|
||||
struct nouveau_object *m2mf;
|
||||
struct nouveau_object *compute;
|
||||
};
|
||||
|
||||
int nouveau_ws_context_create(struct nouveau_ws_device *, struct nouveau_ws_context **out);
|
||||
|
||||
Reference in New Issue
Block a user