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
ff6eec3e
Commit
ff6eec3e
authored
Nov 09, 2010
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video: check batch buffer emitting
Signed-off-by:
Xiang, Haihao
<
haihao.xiang@intel.com
>
parent
b077c907
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
1 deletion
+58
-1
i965_drv_video/i965_media.c
i965_drv_video/i965_media.c
+1
-1
i965_drv_video/intel_batchbuffer.c
i965_drv_video/intel_batchbuffer.c
+44
-0
i965_drv_video/intel_batchbuffer.h
i965_drv_video/intel_batchbuffer.h
+13
-0
No files found.
i965_drv_video/i965_media.c
View file @
ff6eec3e
...
@@ -177,7 +177,7 @@ i965_media_depth_buffer(VADriverContextP ctx)
...
@@ -177,7 +177,7 @@ i965_media_depth_buffer(VADriverContextP ctx)
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
ADVANCE_BATCH
();
ADVANCE_BATCH
(
ctx
);
}
}
static
void
static
void
...
...
i965_drv_video/intel_batchbuffer.c
View file @
ff6eec3e
...
@@ -356,3 +356,47 @@ intel_batchbuffer_end_atomic_bcs(VADriverContextP ctx)
...
@@ -356,3 +356,47 @@ intel_batchbuffer_end_atomic_bcs(VADriverContextP ctx)
intel_batchbuffer_end_atomic_helper
(
intel
->
batch_bcs
);
intel_batchbuffer_end_atomic_helper
(
intel
->
batch_bcs
);
}
}
static
void
intel_batchbuffer_begin_batch_helper
(
struct
intel_batchbuffer
*
batch
,
int
total
)
{
batch
->
emit_total
=
total
*
4
;
batch
->
emit_start
=
batch
->
ptr
;
}
void
intel_batchbuffer_begin_batch
(
VADriverContextP
ctx
,
int
total
)
{
struct
intel_driver_data
*
intel
=
intel_driver_data
(
ctx
);
intel_batchbuffer_begin_batch_helper
(
intel
->
batch
,
total
);
}
void
intel_batchbuffer_begin_batch_bcs
(
VADriverContextP
ctx
,
int
total
)
{
struct
intel_driver_data
*
intel
=
intel_driver_data
(
ctx
);
intel_batchbuffer_begin_batch_helper
(
intel
->
batch_bcs
,
total
);
}
static
void
intel_batchbuffer_advance_batch_helper
(
struct
intel_batchbuffer
*
batch
)
{
assert
(
batch
->
emit_total
==
(
batch
->
ptr
-
batch
->
emit_start
));
}
void
intel_batchbuffer_advance_batch
(
VADriverContextP
ctx
)
{
struct
intel_driver_data
*
intel
=
intel_driver_data
(
ctx
);
intel_batchbuffer_advance_batch_helper
(
intel
->
batch
);
}
void
intel_batchbuffer_advance_batch_bcs
(
VADriverContextP
ctx
)
{
struct
intel_driver_data
*
intel
=
intel_driver_data
(
ctx
);
intel_batchbuffer_advance_batch_helper
(
intel
->
batch_bcs
);
}
i965_drv_video/intel_batchbuffer.h
View file @
ff6eec3e
...
@@ -18,6 +18,9 @@ struct intel_batchbuffer
...
@@ -18,6 +18,9 @@ struct intel_batchbuffer
int
atomic
;
int
atomic
;
int
flag
;
int
flag
;
int
emit_total
;
unsigned
char
*
emit_start
;
int
(
*
run
)(
drm_intel_bo
*
bo
,
int
used
,
int
(
*
run
)(
drm_intel_bo
*
bo
,
int
used
,
drm_clip_rect_t
*
cliprects
,
int
num_cliprects
,
drm_clip_rect_t
*
cliprects
,
int
num_cliprects
,
int
DR4
,
int
ring_flag
);
int
DR4
,
int
ring_flag
);
...
@@ -37,6 +40,9 @@ void intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size);
...
@@ -37,6 +40,9 @@ void intel_batchbuffer_start_atomic(VADriverContextP ctx, unsigned int size);
void
intel_batchbuffer_end_atomic
(
VADriverContextP
ctx
);
void
intel_batchbuffer_end_atomic
(
VADriverContextP
ctx
);
Bool
intel_batchbuffer_flush
(
VADriverContextP
ctx
);
Bool
intel_batchbuffer_flush
(
VADriverContextP
ctx
);
void
intel_batchbuffer_begin_batch
(
VADriverContextP
ctx
,
int
total
);
void
intel_batchbuffer_advance_batch
(
VADriverContextP
ctx
);
void
intel_batchbuffer_emit_dword_bcs
(
VADriverContextP
ctx
,
unsigned
int
x
);
void
intel_batchbuffer_emit_dword_bcs
(
VADriverContextP
ctx
,
unsigned
int
x
);
void
intel_batchbuffer_emit_reloc_bcs
(
VADriverContextP
ctx
,
dri_bo
*
bo
,
void
intel_batchbuffer_emit_reloc_bcs
(
VADriverContextP
ctx
,
dri_bo
*
bo
,
uint32_t
read_domains
,
uint32_t
write_domains
,
uint32_t
read_domains
,
uint32_t
write_domains
,
...
@@ -48,8 +54,12 @@ void intel_batchbuffer_start_atomic_bcs(VADriverContextP ctx, unsigned int size)
...
@@ -48,8 +54,12 @@ void intel_batchbuffer_start_atomic_bcs(VADriverContextP ctx, unsigned int size)
void
intel_batchbuffer_end_atomic_bcs
(
VADriverContextP
ctx
);
void
intel_batchbuffer_end_atomic_bcs
(
VADriverContextP
ctx
);
Bool
intel_batchbuffer_flush_bcs
(
VADriverContextP
ctx
);
Bool
intel_batchbuffer_flush_bcs
(
VADriverContextP
ctx
);
void
intel_batchbuffer_begin_batch_bcs
(
VADriverContextP
ctx
,
int
total
);
void
intel_batchbuffer_advance_batch_bcs
(
VADriverContextP
ctx
);
#define BEGIN_BATCH(ctx, n) do { \
#define BEGIN_BATCH(ctx, n) do { \
intel_batchbuffer_require_space(ctx, (n) * 4); \
intel_batchbuffer_require_space(ctx, (n) * 4); \
intel_batchbuffer_begin_batch(ctx, (n)); \
} while (0)
} while (0)
#define OUT_BATCH(ctx, d) do { \
#define OUT_BATCH(ctx, d) do { \
...
@@ -63,10 +73,12 @@ Bool intel_batchbuffer_flush_bcs(VADriverContextP ctx);
...
@@ -63,10 +73,12 @@ Bool intel_batchbuffer_flush_bcs(VADriverContextP ctx);
} while (0)
} while (0)
#define ADVANCE_BATCH(ctx) do { \
#define ADVANCE_BATCH(ctx) do { \
intel_batchbuffer_advance_batch(ctx); \
} while (0)
} while (0)
#define BEGIN_BCS_BATCH(ctx, n) do { \
#define BEGIN_BCS_BATCH(ctx, n) do { \
intel_batchbuffer_require_space_bcs(ctx, (n) * 4); \
intel_batchbuffer_require_space_bcs(ctx, (n) * 4); \
intel_batchbuffer_begin_batch_bcs(ctx, (n)); \
} while (0)
} while (0)
#define OUT_BCS_BATCH(ctx, d) do { \
#define OUT_BCS_BATCH(ctx, d) do { \
...
@@ -80,6 +92,7 @@ Bool intel_batchbuffer_flush_bcs(VADriverContextP ctx);
...
@@ -80,6 +92,7 @@ Bool intel_batchbuffer_flush_bcs(VADriverContextP ctx);
} while (0)
} while (0)
#define ADVANCE_BCS_BATCH(ctx) do { \
#define ADVANCE_BCS_BATCH(ctx) do { \
intel_batchbuffer_advance_batch_bcs(ctx); \
} while (0)
} while (0)
#endif
/* _INTEL_BATCHBUFFER_H_ */
#endif
/* _INTEL_BATCHBUFFER_H_ */
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