Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
mesa
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2,318
Issues
2,318
List
Boards
Labels
Service Desk
Milestones
Merge Requests
632
Merge Requests
632
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mesa
mesa
Commits
7054ba30
Commit
7054ba30
authored
Jun 03, 2010
by
Zack Rusin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gallium: adjust the query interface to support custom types
we need to change it to support composite types
parent
afa87162
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
22 additions
and
15 deletions
+22
-15
src/gallium/drivers/i965/brw_pipe_query.c
src/gallium/drivers/i965/brw_pipe_query.c
+2
-1
src/gallium/drivers/identity/id_context.c
src/gallium/drivers/identity/id_context.c
+1
-1
src/gallium/drivers/llvmpipe/lp_query.c
src/gallium/drivers/llvmpipe/lp_query.c
+2
-1
src/gallium/drivers/nv50/nv50_query.c
src/gallium/drivers/nv50/nv50_query.c
+2
-1
src/gallium/drivers/nvfx/nvfx_query.c
src/gallium/drivers/nvfx/nvfx_query.c
+2
-1
src/gallium/drivers/r300/r300_query.c
src/gallium/drivers/r300/r300_query.c
+2
-1
src/gallium/drivers/r600/r600_query.c
src/gallium/drivers/r600/r600_query.c
+1
-1
src/gallium/drivers/rbug/rbug_context.c
src/gallium/drivers/rbug/rbug_context.c
+1
-1
src/gallium/drivers/softpipe/sp_query.c
src/gallium/drivers/softpipe/sp_query.c
+2
-1
src/gallium/drivers/svga/svga_pipe_query.c
src/gallium/drivers/svga/svga_pipe_query.c
+3
-2
src/gallium/drivers/trace/tr_context.c
src/gallium/drivers/trace/tr_context.c
+2
-2
src/gallium/include/pipe/p_context.h
src/gallium/include/pipe/p_context.h
+2
-2
No files found.
src/gallium/drivers/i965/brw_pipe_query.c
View file @
7054ba30
...
...
@@ -50,10 +50,11 @@ static boolean
brw_query_get_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
)
void
*
v
result
)
{
struct
brw_context
*
brw
=
brw_context
(
pipe
);
struct
brw_query_object
*
query
=
(
struct
brw_query_object
*
)
q
;
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
/* Map and count the pixels from the current query BO */
if
(
query
->
bo
)
{
...
...
src/gallium/drivers/identity/id_context.c
View file @
7054ba30
...
...
@@ -158,7 +158,7 @@ static boolean
identity_get_query_result
(
struct
pipe_context
*
_pipe
,
struct
pipe_query
*
query
,
boolean
wait
,
uint64_t
*
result
)
void
*
result
)
{
struct
identity_context
*
id_pipe
=
identity_context
(
_pipe
);
struct
pipe_context
*
pipe
=
id_pipe
->
pipe
;
...
...
src/gallium/drivers/llvmpipe/lp_query.c
View file @
7054ba30
...
...
@@ -77,10 +77,11 @@ static boolean
llvmpipe_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
)
void
*
vresult
)
{
struct
llvmpipe_context
*
llvmpipe
=
llvmpipe_context
(
pipe
);
struct
llvmpipe_query
*
pq
=
llvmpipe_query
(
q
);
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
if
(
!
pq
->
done
)
{
lp_setup_flush
(
llvmpipe
->
setup
,
0
);
...
...
src/gallium/drivers/nv50/nv50_query.c
View file @
7054ba30
...
...
@@ -106,8 +106,9 @@ nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
static
boolean
nv50_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
pq
,
boolean
wait
,
uint64_t
*
result
)
boolean
wait
,
void
*
v
result
)
{
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
struct
nv50_query
*
q
=
nv50_query
(
pq
);
int
ret
;
...
...
src/gallium/drivers/nvfx/nvfx_query.c
View file @
7054ba30
...
...
@@ -96,8 +96,9 @@ nvfx_query_end(struct pipe_context *pipe, struct pipe_query *pq)
static
boolean
nvfx_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
pq
,
boolean
wait
,
uint64_t
*
result
)
boolean
wait
,
void
*
v
result
)
{
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
struct
nvfx_context
*
nvfx
=
nvfx_context
(
pipe
);
struct
nvfx_query
*
q
=
nvfx_query
(
pq
);
...
...
src/gallium/drivers/r300/r300_query.c
View file @
7054ba30
...
...
@@ -114,7 +114,7 @@ static void r300_end_query(struct pipe_context* pipe,
static
boolean
r300_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
query
,
boolean
wait
,
uint64_t
*
result
)
void
*
v
result
)
{
struct
r300_context
*
r300
=
r300_context
(
pipe
);
struct
r300_screen
*
r300screen
=
r300
->
screen
;
...
...
@@ -124,6 +124,7 @@ static boolean r300_get_query_result(struct pipe_context* pipe,
uint32_t
*
map
;
uint32_t
temp
=
0
;
unsigned
i
,
num_results
;
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
if
(
q
->
flushed
==
FALSE
)
pipe
->
flush
(
pipe
,
0
,
NULL
);
...
...
src/gallium/drivers/r600/r600_query.c
View file @
7054ba30
...
...
@@ -51,7 +51,7 @@ static void r600_end_query(struct pipe_context *pipe, struct pipe_query *query)
static
boolean
r600_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
query
,
boolean
wait
,
uint64_t
*
result
)
boolean
wait
,
void
*
result
)
{
return
TRUE
;
}
...
...
src/gallium/drivers/rbug/rbug_context.c
View file @
7054ba30
...
...
@@ -241,7 +241,7 @@ static boolean
rbug_get_query_result
(
struct
pipe_context
*
_pipe
,
struct
pipe_query
*
query
,
boolean
wait
,
uint64_t
*
result
)
void
*
result
)
{
struct
rbug_context
*
rb_pipe
=
rbug_context
(
_pipe
);
struct
pipe_context
*
pipe
=
rb_pipe
->
pipe
;
...
...
src/gallium/drivers/softpipe/sp_query.c
View file @
7054ba30
...
...
@@ -118,9 +118,10 @@ static boolean
softpipe_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
)
void
*
vresult
)
{
struct
softpipe_query
*
sq
=
softpipe_query
(
q
);
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
*
result
=
sq
->
end
-
sq
->
start
;
return
TRUE
;
}
...
...
src/gallium/drivers/svga/svga_pipe_query.c
View file @
7054ba30
...
...
@@ -63,7 +63,7 @@ svga_query( struct pipe_query *q )
static
boolean
svga_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
);
void
*
result
);
static
struct
pipe_query
*
svga_create_query
(
struct
pipe_context
*
pipe
,
unsigned
query_type
)
...
...
@@ -207,13 +207,14 @@ static void svga_end_query(struct pipe_context *pipe,
static
boolean
svga_get_query_result
(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
)
void
*
v
result
)
{
struct
svga_context
*
svga
=
svga_context
(
pipe
);
struct
svga_screen
*
svgascreen
=
svga_screen
(
pipe
->
screen
);
struct
svga_winsys_screen
*
sws
=
svgascreen
->
sws
;
struct
svga_query
*
sq
=
svga_query
(
q
);
SVGA3dQueryState
state
;
uint64_t
*
result
=
(
uint64_t
*
)
vresult
;
SVGA_DBG
(
DEBUG_QUERY
,
"%s wait: %d
\n
"
,
__FUNCTION__
);
...
...
src/gallium/drivers/trace/tr_context.c
View file @
7054ba30
...
...
@@ -248,7 +248,7 @@ static INLINE boolean
trace_context_get_query_result
(
struct
pipe_context
*
_pipe
,
struct
pipe_query
*
query
,
boolean
wait
,
uint64_t
*
presult
)
void
*
presult
)
{
struct
trace_context
*
tr_ctx
=
trace_context
(
_pipe
);
struct
pipe_context
*
pipe
=
tr_ctx
->
pipe
;
...
...
@@ -260,7 +260,7 @@ trace_context_get_query_result(struct pipe_context *_pipe,
trace_dump_arg
(
ptr
,
pipe
);
_result
=
pipe
->
get_query_result
(
pipe
,
query
,
wait
,
presult
);
result
=
*
presult
;
result
=
*
((
uint64_t
*
)
presult
)
;
trace_dump_arg
(
uint
,
result
);
trace_dump_ret
(
bool
,
_result
);
...
...
src/gallium/include/pipe/p_context.h
View file @
7054ba30
...
...
@@ -135,10 +135,10 @@ struct pipe_context {
* \param wait if true, this query will block until the result is ready
* \return TRUE if results are ready, FALSE otherwise
*/
boolean
(
*
get_query_result
)(
struct
pipe_context
*
pipe
,
boolean
(
*
get_query_result
)(
struct
pipe_context
*
pipe
,
struct
pipe_query
*
q
,
boolean
wait
,
uint64_t
*
result
);
void
*
result
);
/*@}*/
/**
...
...
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