Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mesa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
virgl-es
mesa
Commits
2d11411b
Commit
2d11411b
authored
Jun 24, 2008
by
Jakob Bornecrantz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i915: Moved screen creation to intel_be_device
parent
e8af160b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
28 deletions
+26
-28
src/gallium/winsys/common/intel_drm/intel_be_device.c
src/gallium/winsys/common/intel_drm/intel_be_device.c
+8
-1
src/gallium/winsys/common/intel_drm/intel_be_device.h
src/gallium/winsys/common/intel_drm/intel_be_device.h
+6
-1
src/gallium/winsys/dri/intel/Makefile
src/gallium/winsys/dri/intel/Makefile
+3
-2
src/gallium/winsys/dri/intel/intel_context.c
src/gallium/winsys/dri/intel/intel_context.c
+3
-20
src/gallium/winsys/dri/intel/intel_screen.c
src/gallium/winsys/dri/intel/intel_screen.c
+6
-4
No files found.
src/gallium/winsys/common/intel_drm/intel_be_device.c
View file @
2d11411b
...
...
@@ -16,6 +16,8 @@
#include "pipe/p_util.h"
#include "pipe/p_inlines.h"
#include "i915simple/i915_screen.h"
/* Turn a pipe winsys into an intel/pipe winsys:
*/
static
INLINE
struct
intel_be_device
*
...
...
@@ -192,7 +194,7 @@ intel_be_fence_finish( struct pipe_winsys *sws,
*/
boolean
intel_be_init_device
(
struct
intel_be_device
*
dev
,
int
fd
)
intel_be_init_device
(
struct
intel_be_device
*
dev
,
int
fd
,
unsigned
id
)
{
dev
->
fd
=
fd
;
dev
->
max_batch_size
=
16
*
4096
;
...
...
@@ -252,6 +254,11 @@ intel_be_init_device(struct intel_be_device *dev, int fd)
1
,
40
,
dev
->
max_batch_size
*
16
,
0
,
dev
->
fMan
);
/* Fill in this struct with callbacks that i915simple will need to
* communicate with the window system, buffer manager, etc.
*/
dev
->
screen
=
i915_create_screen
(
&
dev
->
base
,
id
);
return
true
;
}
...
...
src/gallium/winsys/common/intel_drm/intel_be_device.h
View file @
2d11411b
...
...
@@ -12,6 +12,11 @@ struct intel_be_device
{
struct
pipe_winsys
base
;
/**
* Hw level screen
*/
struct
pipe_screen
*
screen
;
int
fd
;
/**< Drm file discriptor */
size_t
max_batch_size
;
...
...
@@ -28,7 +33,7 @@ struct intel_be_device
};
boolean
intel_be_init_device
(
struct
intel_be_device
*
device
,
int
fd
);
intel_be_init_device
(
struct
intel_be_device
*
device
,
int
fd
,
unsigned
id
);
void
intel_be_destroy_device
(
struct
intel_be_device
*
dev
);
...
...
src/gallium/winsys/dri/intel/Makefile
View file @
2d11411b
...
...
@@ -6,8 +6,9 @@ LIBNAME = i915_dri.so
PIPE_DRIVERS
=
\
$(TOP)
/src/gallium/drivers/softpipe/libsoftpipe.a
\
$(TOP)
/src/gallium/drivers/i915simple/libi915simple.a
\
$(TOP)
/src/gallium/winsys/common/intel_drm/libinteldrm.a
$(TOP)
/src/gallium/winsys/common/intel_drm/libinteldrm.a
\
$(TOP)
/src/gallium/drivers/i915simple/libi915simple.a
DRIVER_SOURCES
=
\
intel_winsys_softpipe.c
\
...
...
src/gallium/winsys/dri/intel/intel_context.c
View file @
2d11411b
...
...
@@ -134,25 +134,6 @@ static const struct dri_debug_control debug_control[] = {
/**
* Create i915 hardware rendering context.
*/
static
struct
pipe_context
*
intel_create_i915simple
(
struct
intel_context
*
intel
,
struct
pipe_winsys
*
winsys
)
{
struct
pipe_screen
*
screen
;
/* Fill in this struct with callbacks that i915simple will need to
* communicate with the window system, buffer manager, etc.
*/
screen
=
i915_create_screen
(
winsys
,
intel
->
intelScreen
->
deviceID
);
/* Create the i915simple context:
*/
return
i915_create_context
(
screen
,
winsys
,
&
intel
->
base
.
base
);
}
static
void
intel_lock_hardware
(
struct
intel_be_context
*
context
)
{
...
...
@@ -250,7 +231,9 @@ intelCreateContext(const __GLcontextModes * visual,
case
PCI_CHIP_Q35_G
:
case
PCI_CHIP_I915_G
:
case
PCI_CHIP_I915_GM
:
pipe
=
intel_create_i915simple
(
intel
,
&
intelScreen
->
base
.
base
);
pipe
=
i915_create_context
(
intelScreen
->
base
.
screen
,
&
intelScreen
->
base
.
base
,
&
intel
->
base
.
base
);
break
;
default:
fprintf
(
stderr
,
"Unknown PCIID %x in %s, using software driver
\n
"
,
...
...
src/gallium/winsys/dri/intel/intel_screen.c
View file @
2d11411b
...
...
@@ -198,10 +198,12 @@ intel_flush_frontbuffer( struct pipe_winsys *winsys,
struct
pipe_surface
*
surf
,
void
*
context_private
)
{
struct
intel_context
*
intel
=
(
struct
intel_context
*
)
context_private
;
__DRIdrawablePrivate
*
dPriv
=
intel
->
driDrawable
;
//
struct intel_context *intel = (struct intel_context *) context_private;
//
__DRIdrawablePrivate *dPriv = intel->driDrawable;
intelDisplaySurface
(
dPriv
,
surf
,
NULL
);
assert
((
int
)
"Doesn't work currently"
&
0
);
//intelDisplaySurface(dPriv, surf, NULL);
}
static
boolean
...
...
@@ -254,9 +256,9 @@ intelInitDriver(__DRIscreenPrivate * sPriv)
(
*
glx_enable_extension
)
(
psc
,
"GLX_SGI_make_current_read"
);
}
intel_be_init_device
(
&
intelScreen
->
base
,
sPriv
->
fd
);
intelScreen
->
base
.
base
.
flush_frontbuffer
=
intel_flush_frontbuffer
;
intelScreen
->
base
.
base
.
get_name
=
intel_get_name
;
intel_be_init_device
(
&
intelScreen
->
base
,
sPriv
->
fd
,
intelScreen
->
deviceID
);
return
GL_TRUE
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment