Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
bb75774c
Commit
bb75774c
authored
Aug 11, 2009
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video: clear draw buffer before rendering.
parent
3b220c84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
0 deletions
+52
-0
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+42
-0
i965_drv_video/intel_driver.h
i965_drv_video/intel_driver.h
+10
-0
No files found.
i965_drv_video/i965_render.c
View file @
bb75774c
...
...
@@ -1212,11 +1212,53 @@ i965_render_startup(VADriverContextP ctx)
ADVANCE_BATCH
(
ctx
);
}
static
void
i965_clear_dest_region
(
VADriverContextP
ctx
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
struct
intel_region
*
dest_region
=
render_state
->
draw_region
;
unsigned
int
blt_cmd
,
br13
;
int
pitch
;
blt_cmd
=
XY_COLOR_BLT_CMD
;
br13
=
0xf0
<<
16
;
pitch
=
dest_region
->
pitch
;
if
(
dest_region
->
cpp
==
4
)
{
br13
|=
BR13_8888
;
blt_cmd
|=
(
XY_COLOR_BLT_WRITE_RGB
|
XY_COLOR_BLT_WRITE_ALPHA
);
}
else
{
assert
(
dest_region
->
cpp
==
2
);
br13
|=
BR13_565
;
}
if
(
dest_region
->
tiling
!=
I915_TILING_NONE
)
{
blt_cmd
|=
XY_COLOR_BLT_DST_TILED
;
pitch
/=
4
;
}
br13
|=
pitch
;
BEGIN_BATCH
(
ctx
,
6
);
OUT_BATCH
(
ctx
,
blt_cmd
);
OUT_BATCH
(
ctx
,
br13
);
OUT_BATCH
(
ctx
,
(
dest_region
->
y
<<
16
)
|
(
dest_region
->
x
));
OUT_BATCH
(
ctx
,
((
dest_region
->
y
+
dest_region
->
height
)
<<
16
)
|
(
dest_region
->
x
+
dest_region
->
width
));
OUT_RELOC
(
ctx
,
dest_region
->
bo
,
I915_GEM_DOMAIN_RENDER
,
I915_GEM_DOMAIN_RENDER
,
0
);
OUT_BATCH
(
ctx
,
0x0
);
ADVANCE_BATCH
(
ctx
);
}
static
void
i965_surface_render_pipeline_setup
(
VADriverContextP
ctx
)
{
intel_batchbuffer_start_atomic
(
ctx
,
0x1000
);
intel_batchbuffer_emit_mi_flush
(
ctx
);
i965_clear_dest_region
(
ctx
);
i965_render_pipeline_select
(
ctx
);
i965_render_state_sip
(
ctx
);
i965_render_state_base_address
(
ctx
);
...
...
i965_drv_video/intel_driver.h
View file @
bb75774c
...
...
@@ -21,6 +21,7 @@
#define BATCH_RESERVED 0x10
#define CMD_MI (0x0 << 29)
#define CMD_2D (0x2 << 29)
#define MI_NOOP (CMD_MI | 0)
...
...
@@ -29,6 +30,15 @@
#define MI_FLUSH (CMD_MI | (0x4 << 23))
#define STATE_INSTRUCTION_CACHE_INVALIDATE (0x1 << 0)
#define XY_COLOR_BLT_CMD (CMD_2D | (0x50 << 22) | 0x04)
#define XY_COLOR_BLT_WRITE_ALPHA (1 << 21)
#define XY_COLOR_BLT_WRITE_RGB (1 << 20)
#define XY_COLOR_BLT_DST_TILED (1 << 11)
/* BR13 */
#define BR13_565 (0x1 << 24)
#define BR13_8888 (0x3 << 24)
struct
intel_batchbuffer
;
#define ALIGN(i, n) (((i) + (n) - 1) & ~((n) - 1))
...
...
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