gallium: fix type of flags in pipe_context::flush()
It should be unsigned, not enum pipe_flush_flags. Fixed a build error: src/gallium/state_trackers/egl/android/native_android.cpp:426:29: error: invalid conversion from 'int' to 'pipe_flush_flags' [-fpermissive] v2: replace all occurrences of enum pipe_flush_flags by unsigned Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> [olv: document the parameter now that the type is unsigned]
This commit is contained in:
@@ -96,7 +96,7 @@ fd_context_render(struct pipe_context *pctx)
|
||||
|
||||
static void
|
||||
fd_context_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
DBG("fence=%p", fence);
|
||||
|
||||
|
@@ -844,7 +844,7 @@ galahad_context_clear_depth_stencil(struct pipe_context *_pipe,
|
||||
static void
|
||||
galahad_context_flush(struct pipe_context *_pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct galahad_context *glhd_pipe = galahad_context(_pipe);
|
||||
struct pipe_context *pipe = glhd_pipe->pipe;
|
||||
|
@@ -55,6 +55,6 @@
|
||||
*/
|
||||
extern void i915_flush(struct i915_context *i915,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags);
|
||||
unsigned flags);
|
||||
|
||||
#endif
|
||||
|
@@ -40,7 +40,7 @@
|
||||
|
||||
static void i915_flush_pipe( struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags )
|
||||
unsigned flags )
|
||||
{
|
||||
struct i915_context *i915 = i915_context(pipe);
|
||||
enum i915_winsys_flush_flags winsys_flags = I915_FLUSH_ASYNC;
|
||||
@@ -71,7 +71,7 @@ void i915_init_flush_functions( struct i915_context *i915 )
|
||||
*/
|
||||
void i915_flush(struct i915_context *i915,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct i915_winsys_batchbuffer *batch = i915->batch;
|
||||
|
||||
|
@@ -712,7 +712,7 @@ identity_clear_depth_stencil(struct pipe_context *_pipe,
|
||||
static void
|
||||
identity_flush(struct pipe_context *_pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct identity_context *id_pipe = identity_context(_pipe);
|
||||
struct pipe_context *pipe = id_pipe->pipe;
|
||||
|
@@ -77,7 +77,7 @@ ilo_context_post_cp_flush(struct ilo_cp *cp, void *data)
|
||||
static void
|
||||
ilo_flush(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **f,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct ilo_context *ilo = ilo_context(pipe);
|
||||
|
||||
|
@@ -103,7 +103,7 @@ static void llvmpipe_destroy( struct pipe_context *pipe )
|
||||
static void
|
||||
do_flush( struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
llvmpipe_flush(pipe, fence, __FUNCTION__);
|
||||
}
|
||||
|
@@ -243,7 +243,7 @@ static void noop_blit(struct pipe_context *ctx,
|
||||
*/
|
||||
static void noop_flush(struct pipe_context *ctx,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -69,7 +69,7 @@ nv30_context_kick_notify(struct nouveau_pushbuf *push)
|
||||
|
||||
static void
|
||||
nv30_context_flush(struct pipe_context *pipe, struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct nv30_context *nv30 = nv30_context(pipe);
|
||||
struct nouveau_pushbuf *push = nv30->base.pushbuf;
|
||||
|
@@ -34,7 +34,7 @@
|
||||
static void
|
||||
nv50_flush(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct nouveau_screen *screen = nouveau_screen(pipe->screen);
|
||||
|
||||
|
@@ -34,7 +34,7 @@
|
||||
static void
|
||||
nvc0_flush(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct nvc0_context *nvc0 = nvc0_context(pipe);
|
||||
struct nouveau_screen *screen = &nvc0->screen->base;
|
||||
|
@@ -139,7 +139,7 @@ void r300_flush(struct pipe_context *pipe,
|
||||
|
||||
static void r300_flush_wrapped(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
r300_flush(pipe,
|
||||
flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0,
|
||||
|
@@ -183,7 +183,7 @@ static void r600_flush(struct pipe_context *ctx, unsigned flags)
|
||||
|
||||
static void r600_flush_from_st(struct pipe_context *ctx,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct r600_context *rctx = (struct r600_context *)ctx;
|
||||
struct r600_fence **rfence = (struct r600_fence**)fence;
|
||||
|
@@ -161,7 +161,7 @@ void radeonsi_flush(struct pipe_context *ctx, struct pipe_fence_handle **fence,
|
||||
|
||||
static void r600_flush_from_st(struct pipe_context *ctx,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
radeonsi_flush(ctx, fence,
|
||||
flags & PIPE_FLUSH_END_OF_FRAME ? RADEON_FLUSH_END_OF_FRAME : 0);
|
||||
|
@@ -942,7 +942,7 @@ rbug_clear_depth_stencil(struct pipe_context *_pipe,
|
||||
static void
|
||||
rbug_flush(struct pipe_context *_pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct rbug_context *rb_pipe = rbug_context(_pipe);
|
||||
struct pipe_context *pipe = rb_pipe->pipe;
|
||||
|
@@ -96,7 +96,7 @@ softpipe_flush( struct pipe_context *pipe,
|
||||
void
|
||||
softpipe_flush_wrapped(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
softpipe_flush(pipe, SP_FLUSH_TEXTURE_CACHE, fence);
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@ softpipe_flush(struct pipe_context *pipe,
|
||||
void
|
||||
softpipe_flush_wrapped(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags);
|
||||
unsigned flags);
|
||||
|
||||
boolean
|
||||
softpipe_flush_resource(struct pipe_context *pipe,
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
static void svga_flush( struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct svga_context *svga = svga_context(pipe);
|
||||
|
||||
|
@@ -1287,7 +1287,7 @@ trace_context_clear_depth_stencil(struct pipe_context *_pipe,
|
||||
static INLINE void
|
||||
trace_context_flush(struct pipe_context *_pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
struct trace_context *tr_ctx = trace_context(_pipe);
|
||||
struct pipe_context *pipe = tr_ctx->pipe;
|
||||
|
@@ -349,10 +349,12 @@ struct pipe_context {
|
||||
unsigned width, unsigned height);
|
||||
|
||||
/** Flush draw commands
|
||||
*
|
||||
* \param flags bitfield of enum pipe_flush_flags values.
|
||||
*/
|
||||
void (*flush)(struct pipe_context *pipe,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags);
|
||||
unsigned flags);
|
||||
|
||||
/**
|
||||
* Create a view on a texture to be used by a shader stage.
|
||||
|
@@ -53,7 +53,7 @@ _cl_command_queue::flush() {
|
||||
[](event_ptr &ev) { return !ev->signalled(); });
|
||||
|
||||
// Flush and fence them.
|
||||
pipe->flush(pipe, &fence, (enum pipe_flush_flags)0);
|
||||
pipe->flush(pipe, &fence, 0);
|
||||
std::for_each(first, last, [&](event_ptr &ev) { ev->fence(fence); });
|
||||
screen->fence_reference(screen, &fence, NULL);
|
||||
queued_events.erase(first, last);
|
||||
|
@@ -143,7 +143,7 @@ vg_context_flush(struct st_context_iface *stctxi, unsigned flags,
|
||||
struct pipe_fence_handle **fence)
|
||||
{
|
||||
struct vg_context *ctx = (struct vg_context *) stctxi;
|
||||
enum pipe_flush_flags pipe_flags = 0;
|
||||
unsigned pipe_flags = 0;
|
||||
|
||||
if (flags & ST_FLUSH_END_OF_FRAME) {
|
||||
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;
|
||||
|
@@ -77,7 +77,7 @@ display_front_buffer(struct st_context *st)
|
||||
|
||||
void st_flush(struct st_context *st,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags)
|
||||
unsigned flags)
|
||||
{
|
||||
FLUSH_VERTICES(st->ctx, 0);
|
||||
FLUSH_CURRENT(st->ctx, 0);
|
||||
|
@@ -42,7 +42,7 @@ st_init_flush_functions(struct dd_function_table *functions);
|
||||
extern void
|
||||
st_flush(struct st_context *st,
|
||||
struct pipe_fence_handle **fence,
|
||||
enum pipe_flush_flags flags);
|
||||
unsigned flags);
|
||||
|
||||
extern void
|
||||
st_finish(struct st_context *st);
|
||||
|
@@ -453,7 +453,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
|
||||
struct pipe_fence_handle **fence)
|
||||
{
|
||||
struct st_context *st = (struct st_context *) stctxi;
|
||||
enum pipe_flush_flags pipe_flags = 0;
|
||||
unsigned pipe_flags = 0;
|
||||
|
||||
if (flags & ST_FLUSH_END_OF_FRAME) {
|
||||
pipe_flags |= PIPE_FLUSH_END_OF_FRAME;
|
||||
|
Reference in New Issue
Block a user