2 Copyright 2015-2019, The AROS Development Team. All rights reserved.
6 #include <aros/debug.h>
8 #include <proto/exec.h>
9 #include <proto/graphics.h>
10 #include <proto/utility.h>
11 #include <proto/oop.h>
13 #include <aros/libcall.h>
14 #include <aros/asmcall.h>
15 #include <aros/symbolsets.h>
16 #include <utility/tagitem.h>
18 #include <hidd/gallium.h>
19 #include <gallium/gallium.h>
21 #include "vmwaresvga_intern.h"
23 // ****************************************************************************
24 // Gallium Hidd Methods
25 // ****************************************************************************
27 OOP_Object
*METHOD(GalliumVMWareSVGA
, Root
, New
)
31 D(bug("[VMWareSVGA:Gallium] %s()\n", __func__
);)
33 interfaceVers
= GetTagData(aHidd_Gallium_InterfaceVersion
, -1, msg
->attrList
);
34 if (interfaceVers
!= GALLIUM_INTERFACE_VERSION
)
37 o
= (OOP_Object
*)OOP_DoSuperMethod(cl
, o
, (OOP_Msg
) msg
);
40 struct HIDDGalliumVMWareSVGAData
* data
= OOP_INST_DATA(cl
, o
);
42 memset(data
, 0, sizeof(struct HIDDGalliumVMWareSVGAData
));
45 data
->hwdata
= &XSD(cl
)->data
;
47 VMWareSVGA_WSScr_WinSysInit(data
);
53 VOID
METHOD(GalliumVMWareSVGA
, Root
, Dispose
)
55 D(bug("[VMWareSVGA:Gallium] %s()\n", __func__
);)
57 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
60 VOID
METHOD(GalliumVMWareSVGA
, Root
, Get
)
64 if (IS_GALLIUM_ATTR(msg
->attrID
, idx
))
68 /* Overload the property */
69 case aoHidd_Gallium_InterfaceVersion
:
70 *msg
->storage
= GALLIUM_INTERFACE_VERSION
;
75 /* Use parent class for all other properties */
76 OOP_DoSuperMethod(cl
, o
, (OOP_Msg
)msg
);
79 APTR
METHOD(GalliumVMWareSVGA
, Hidd_Gallium
, CreatePipeScreen
)
81 struct HIDDGalliumVMWareSVGAData
* data
= OOP_INST_DATA(cl
, o
);
82 struct pipe_screen
*screen
= NULL
;
84 D(bug("[VMWareSVGA:Gallium] %s()\n", __func__
);)
86 screen
= svga_screen_create(&data
->wssbase
);
88 D(bug("[VMWareSVGA:Gallium] %s: screen @ 0x%p\n", __func__
, screen
));
93 VOID
METHOD(GalliumVMWareSVGA
, Hidd_Gallium
, DisplayResource
)
95 struct pipe_resource
*res
= (struct pipe_resource
*)msg
->resource
;
96 struct pipe_screen
*resScreen
;
98 D(bug("[VMWareSVGA:Gallium] %s()\n", __func__
);)
99 D(bug("[VMWareSVGA:Gallium] %s: resource @ 0x%p\n", __func__
, msg
->resource
);)
100 D(bug("[VMWareSVGA:Gallium] %s: bitmap @ 0x%p\n", __func__
, msg
->bitmap
);)
102 resScreen
= res
->screen
;
104 D(bug("[VMWareSVGA:Gallium] %s: resource screen @ 0x%p\n", __func__
, resScreen
);)