projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nouveau: use bool instead of boolean
[mesa.git]
/
src
/
gallium
/
drivers
/
nouveau
/
nv50
/
nv50_query.c
diff --git
a/src/gallium/drivers/nouveau/nv50/nv50_query.c
b/src/gallium/drivers/nouveau/nv50/nv50_query.c
index a5b95c13958e5593f929c135ae0a25cc1a48d49d..f4c0639f2338223051967db8c2eee21c54819be7 100644
(file)
--- a/
src/gallium/drivers/nouveau/nv50/nv50_query.c
+++ b/
src/gallium/drivers/nouveau/nv50/nv50_query.c
@@
-48,7
+48,7
@@
struct nv50_query {
uint32_t base;
uint32_t offset; /* base + i * 32 */
uint8_t state;
uint32_t base;
uint32_t offset; /* base + i * 32 */
uint8_t state;
- bool
ean
is64bit;
+ bool is64bit;
int nesting; /* only used for occlusion queries */
struct nouveau_mm_allocation *mm;
struct nouveau_fence *fence;
int nesting; /* only used for occlusion queries */
struct nouveau_mm_allocation *mm;
struct nouveau_fence *fence;
@@
-62,7
+62,7
@@
nv50_query(struct pipe_query *pipe)
return (struct nv50_query *)pipe;
}
return (struct nv50_query *)pipe;
}
-static bool
ean
+static bool
nv50_query_allocate(struct nv50_context *nv50, struct nv50_query *q, int size)
{
struct nv50_screen *screen = nv50->screen;
nv50_query_allocate(struct nv50_context *nv50, struct nv50_query *q, int size)
{
struct nv50_screen *screen = nv50->screen;
@@
-81,17
+81,17
@@
nv50_query_allocate(struct nv50_context *nv50, struct nv50_query *q, int size)
if (size) {
q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
if (!q->bo)
if (size) {
q->mm = nouveau_mm_allocate(screen->base.mm_GART, size, &q->bo, &q->base);
if (!q->bo)
- return
FALSE
;
+ return
false
;
q->offset = q->base;
ret = nouveau_bo_map(q->bo, 0, screen->base.client);
if (ret) {
nv50_query_allocate(nv50, q, 0);
q->offset = q->base;
ret = nouveau_bo_map(q->bo, 0, screen->base.client);
if (ret) {
nv50_query_allocate(nv50, q, 0);
- return
FALSE
;
+ return
false
;
}
q->data = (uint32_t *)((uint8_t *)q->bo->map + q->base);
}
}
q->data = (uint32_t *)((uint8_t *)q->bo->map + q->base);
}
- return
TRUE
;
+ return
true
;
}
static void
}
static void
@@
-154,8
+154,8
@@
nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
struct nv50_query *q = nv50_query(pq);
/* For occlusion queries we have to change the storage, because a previous
struct nv50_query *q = nv50_query(pq);
/* For occlusion queries we have to change the storage, because a previous
- * query might set the initial render conition to
FALSE
even *after* we re-
- * initialized it to
TRUE
.
+ * query might set the initial render conition to
false
even *after* we re-
+ * initialized it to
true
.
*/
if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
q->offset += 32;
*/
if (q->type == PIPE_QUERY_OCCLUSION_COUNTER) {
q->offset += 32;
@@
-167,7
+167,7
@@
nv50_query_begin(struct pipe_context *pipe, struct pipe_query *pq)
* query ?
*/
q->data[0] = q->sequence; /* initialize sequence */
* query ?
*/
q->data[0] = q->sequence; /* initialize sequence */
- q->data[1] = 1; /* initial render condition =
TRUE
*/
+ q->data[1] = 1; /* initial render condition =
true
*/
q->data[4] = q->sequence + 1; /* for comparison COND_MODE */
q->data[5] = 0;
}
q->data[4] = q->sequence + 1; /* for comparison COND_MODE */
q->data[5] = 0;
}
@@
-269,7
+269,7
@@
nv50_query_end(struct pipe_context *pipe, struct pipe_query *pq)
nv50_query_get(push, q, 0, 0x0d005002 | (q->index << 5));
break;
case PIPE_QUERY_TIMESTAMP_DISJOINT:
nv50_query_get(push, q, 0, 0x0d005002 | (q->index << 5));
break;
case PIPE_QUERY_TIMESTAMP_DISJOINT:
- /* This query is not issued on GPU because disjoint is forced to
FALSE
*/
+ /* This query is not issued on GPU because disjoint is forced to
false
*/
q->state = NV50_QUERY_STATE_READY;
break;
default:
q->state = NV50_QUERY_STATE_READY;
break;
default:
@@
-301,7
+301,7
@@
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
struct nv50_query *q = nv50_query(pq);
uint64_t *res64 = (uint64_t *)result;
uint32_t *res32 = (uint32_t *)result;
struct nv50_query *q = nv50_query(pq);
uint64_t *res64 = (uint64_t *)result;
uint32_t *res32 = (uint32_t *)result;
-
boolean *res8 = (boolean
*)result;
+
uint8_t *res8 = (uint8_t
*)result;
uint64_t *data64 = (uint64_t *)q->data;
int i;
uint64_t *data64 = (uint64_t *)q->data;
int i;
@@
-315,16
+315,16
@@
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
q->state = NV50_QUERY_STATE_FLUSHED;
PUSH_KICK(nv50->base.pushbuf);
}
q->state = NV50_QUERY_STATE_FLUSHED;
PUSH_KICK(nv50->base.pushbuf);
}
- return
FALSE
;
+ return
false
;
}
if (nouveau_bo_wait(q->bo, NOUVEAU_BO_RD, nv50->screen->base.client))
}
if (nouveau_bo_wait(q->bo, NOUVEAU_BO_RD, nv50->screen->base.client))
- return
FALSE
;
+ return
false
;
}
q->state = NV50_QUERY_STATE_READY;
switch (q->type) {
case PIPE_QUERY_GPU_FINISHED:
}
q->state = NV50_QUERY_STATE_READY;
switch (q->type) {
case PIPE_QUERY_GPU_FINISHED:
- res8[0] =
TRUE
;
+ res8[0] =
true
;
break;
case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32 count, u64 time */
res64[0] = q->data[1] - q->data[5];
break;
case PIPE_QUERY_OCCLUSION_COUNTER: /* u32 sequence, u32 count, u64 time */
res64[0] = q->data[1] - q->data[5];
@@
-346,7
+346,7
@@
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
break;
case PIPE_QUERY_TIMESTAMP_DISJOINT:
res64[0] = 1000000000;
break;
case PIPE_QUERY_TIMESTAMP_DISJOINT:
res64[0] = 1000000000;
- res8[8] =
FALSE
;
+ res8[8] =
false
;
break;
case PIPE_QUERY_TIME_ELAPSED:
res64[0] = data64[1] - data64[3];
break;
case PIPE_QUERY_TIME_ELAPSED:
res64[0] = data64[1] - data64[3];
@@
-355,10
+355,10
@@
nv50_query_result(struct pipe_context *pipe, struct pipe_query *pq,
res32[0] = q->data[1];
break;
default:
res32[0] = q->data[1];
break;
default:
- return
FALSE
;
+ return
false
;
}
}
- return
TRUE
;
+ return
true
;
}
void
}
void
@@
-385,7
+385,7
@@
nv50_render_condition(struct pipe_context *pipe,
struct nouveau_pushbuf *push = nv50->base.pushbuf;
struct nv50_query *q;
uint32_t cond;
struct nouveau_pushbuf *push = nv50->base.pushbuf;
struct nv50_query *q;
uint32_t cond;
- bool
ean
wait =
+ bool wait =
mode != PIPE_RENDER_COND_NO_WAIT &&
mode != PIPE_RENDER_COND_BY_REGION_NO_WAIT;
mode != PIPE_RENDER_COND_NO_WAIT &&
mode != PIPE_RENDER_COND_BY_REGION_NO_WAIT;
@@
-399,7
+399,7
@@
nv50_render_condition(struct pipe_context *pipe,
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
cond = condition ? NV50_3D_COND_MODE_EQUAL :
NV50_3D_COND_MODE_NOT_EQUAL;
case PIPE_QUERY_SO_OVERFLOW_PREDICATE:
cond = condition ? NV50_3D_COND_MODE_EQUAL :
NV50_3D_COND_MODE_NOT_EQUAL;
- wait =
TRUE
;
+ wait =
true
;
break;
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE:
break;
case PIPE_QUERY_OCCLUSION_COUNTER:
case PIPE_QUERY_OCCLUSION_PREDICATE:
@@
-468,7
+468,7
@@
nv50_query_pushbuf_submit(struct nouveau_pushbuf *push,
void
nva0_so_target_save_offset(struct pipe_context *pipe,
struct pipe_stream_output_target *ptarg,
void
nva0_so_target_save_offset(struct pipe_context *pipe,
struct pipe_stream_output_target *ptarg,
- unsigned index, bool
ean
serialize)
+ unsigned index, bool serialize)
{
struct nv50_so_target *targ = nv50_so_target(ptarg);
{
struct nv50_so_target *targ = nv50_so_target(ptarg);