Also fix up Makefiles to use the default mesa compilation flags.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrants <jakob@vmware.com>
##### MACROS #####
-XA_CFLAGS = -g -fPIC -Wall
+XA_CFLAGS = -Wall -pedantic
XA_INCLUDES= -I$(TOP)/src/gallium/ \
-I$(TOP)/src/gallium/auxiliary \
##### RULES #####
.c.o:
- $(CC) -c $(XA_CFLAGS) $(XA_INCLUDES) $<
+ $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $<
##### TARGETS #####
return 1;
}
-int
+XA_EXPORT int
xa_composite_check_accelerated(const struct xa_composite *comp)
{
struct xa_composite_blend blend;
ctx->bound_sampler_views);
}
-int
+XA_EXPORT int
xa_composite_prepare(struct xa_context *ctx,
const struct xa_composite *comp)
{
return XA_ERR_NONE;
}
-void xa_composite_rect(struct xa_context *ctx,
- int srcX, int srcY, int maskX, int maskY,
- int dstX, int dstY, int width, int height)
+XA_EXPORT void
+xa_composite_rect(struct xa_context *ctx,
+ int srcX, int srcY, int maskX, int maskY,
+ int dstX, int dstY, int width, int height)
{
if (ctx->num_bound_samplers == 0 ) { /* solid fill */
renderer_solid(ctx, dstX, dstY, dstX + width, dstY + height,
}
}
-void
+XA_EXPORT void
xa_composite_done(struct xa_context *ctx)
{
renderer_draw_flush(ctx);
.xa_source_pict_size = sizeof(union xa_source_pict),
};
-const struct xa_composite_allocation *
+XA_EXPORT const struct xa_composite_allocation *
xa_composite_allocation(void)
{
return &a;
#include "pipe/p_context.h"
-struct xa_context *
+XA_EXPORT struct xa_context *
xa_context_default(struct xa_tracker *xa)
{
return xa->default_ctx;
}
-struct xa_context *
+XA_EXPORT struct xa_context *
xa_context_create(struct xa_tracker *xa)
{
struct xa_context *ctx = calloc(1, sizeof(*ctx));
return ctx;
}
-void
+XA_EXPORT void
xa_context_destroy(struct xa_context *r)
{
struct pipe_resource **vsbuf = &r->vs_const_buffer;
r->pipe->destroy(r->pipe);
}
-int
+XA_EXPORT int
xa_surface_dma(struct xa_context *ctx,
struct xa_surface *srf,
void *data,
return -XA_ERR_NORES;
}
-void *
+XA_EXPORT void *
xa_surface_map(struct xa_context *ctx,
struct xa_surface *srf, unsigned int usage)
{
return map;
}
-void
+XA_EXPORT void
xa_surface_unmap(struct xa_surface *srf)
{
if (srf->transfer) {
pipe_surface_reference(&ctx->srf, NULL);
}
-int
+XA_EXPORT int
xa_copy_prepare(struct xa_context *ctx,
struct xa_surface *dst, struct xa_surface *src)
{
return 0;
}
-void
+XA_EXPORT void
xa_copy(struct xa_context *ctx,
int dx, int dy, int sx, int sy, int width, int height)
{
(float) ctx->src->tex->height0);
}
-void
+XA_EXPORT void
xa_copy_done(struct xa_context *ctx)
{
if (!ctx->simple_copy) {
cso_set_blend(ctx->cso, &blend);
}
-int
+XA_EXPORT int
xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
uint32_t fg)
{
return XA_ERR_NONE;
}
-void
+XA_EXPORT void
xa_solid(struct xa_context *ctx, int x, int y, int width, int height)
{
renderer_solid(ctx, x, y, x + width, y + height, ctx->solid_color);
}
-void
+XA_EXPORT void
xa_solid_done(struct xa_context *ctx)
{
renderer_draw_flush(ctx);
ctx->num_bound_samplers = 0;
}
-struct xa_fence *
+XA_EXPORT struct xa_fence *
xa_fence_get(struct xa_context *ctx)
{
struct xa_fence *fence = calloc(1, sizeof(*fence));
return fence;
}
-int
+XA_EXPORT int
xa_fence_wait(struct xa_fence *fence, uint64_t timeout)
{
if (!fence)
return XA_ERR_NONE;
}
-void
+XA_EXPORT void
xa_fence_destroy(struct xa_fence *fence)
{
if (!fence)
#include "pipe/p_context.h"
#include "pipe/p_state.h"
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define XA_EXPORT __attribute__ ((visibility("default")))
+#else
+#define XA_EXPORT
+#endif
+
#define XA_VB_SIZE (100 * 4 * 3 * 4)
#define XA_LAST_SURFACE_TYPE (xa_type_yuv_component + 1)
#define XA_MAX_SAMPLERS 3
return fdesc;
}
-struct xa_tracker *
+XA_EXPORT struct xa_tracker *
xa_tracker_create(int drm_fd)
{
struct xa_tracker *xa = calloc(1, sizeof(struct xa_tracker));
return NULL;
}
-void
+XA_EXPORT void
xa_tracker_destroy(struct xa_tracker *xa)
{
free(xa->supported_formats);
return fdesc;
}
-int
+XA_EXPORT int
xa_format_check_supported(struct xa_tracker *xa,
enum xa_formats xa_format, unsigned int flags)
{
return XA_ERR_NONE;
}
-struct xa_surface *
+XA_EXPORT struct xa_surface *
xa_surface_create(struct xa_tracker *xa,
int width,
int height,
return NULL;
}
-int
+XA_EXPORT int
xa_surface_redefine(struct xa_surface *srf,
int width,
int height,
return XA_ERR_NONE;
}
-void
+XA_EXPORT void
xa_surface_destroy(struct xa_surface *srf)
{
pipe_resource_reference(&srf->tex, NULL);
free(srf);
}
-extern void
+XA_EXPORT void
xa_tracker_version(int *major, int *minor, int *patch)
{
*major = XA_TRACKER_VERSION_MAJOR;
*patch = XA_TRACKER_VERSION_PATCH;
}
-extern int
+XA_EXPORT int
xa_surface_handle(struct xa_surface *srf,
uint32_t * handle, unsigned int *stride)
{
return XA_ERR_NONE;
}
-enum xa_formats
+XA_EXPORT enum xa_formats
xa_surface_format(const struct xa_surface *srf)
{
return srf->fdesc.xa_format;
conversion_matrix, param_bytes);
}
-extern int
+XA_EXPORT int
xa_yuv_planar_blit(struct xa_context *r,
int src_x,
int src_y,
XA_MAJOR = 0
XA_MINOR = 5
XA_TINY = 0
-XA_CFLAGS = -g -fPIC
+XA_CFLAGS = -Wall -pedantic
XA_INCLUDES= -I$(TOP)/src/gallium/ \
-I$(TOP)/src/gallium/auxiliary \
##### RULES #####
.c.o:
- $(CC) -c $(XA_CFLAGS) $(XA_INCLUDES) $<
+ $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $<
##### TARGETS #####