summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xa/Makefile4
-rw-r--r--src/gallium/state_trackers/xa/xa_composite.c15
-rw-r--r--src/gallium/state_trackers/xa/xa_context.c30
-rw-r--r--src/gallium/state_trackers/xa/xa_priv.h6
-rw-r--r--src/gallium/state_trackers/xa/xa_tracker.c18
-rw-r--r--src/gallium/state_trackers/xa/xa_yuv.c2
-rw-r--r--src/gallium/targets/xa-vmwgfx/Makefile4
7 files changed, 43 insertions, 36 deletions
diff --git a/src/gallium/state_trackers/xa/Makefile b/src/gallium/state_trackers/xa/Makefile
index 9ac635136bb..b42e6197045 100644
--- a/src/gallium/state_trackers/xa/Makefile
+++ b/src/gallium/state_trackers/xa/Makefile
@@ -3,7 +3,7 @@ include $(TOP)/configs/current
##### MACROS #####
-XA_CFLAGS = -g -fPIC -Wall
+XA_CFLAGS = -Wall -pedantic
XA_INCLUDES= -I$(TOP)/src/gallium/ \
-I$(TOP)/src/gallium/auxiliary \
@@ -29,7 +29,7 @@ OBJECTS = $(SOURCES:.c=.o)
##### RULES #####
.c.o:
- $(CC) -c $(XA_CFLAGS) $(XA_INCLUDES) $<
+ $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $<
##### TARGETS #####
diff --git a/src/gallium/state_trackers/xa/xa_composite.c b/src/gallium/state_trackers/xa/xa_composite.c
index 1a35d0996bd..f66eebdeb01 100644
--- a/src/gallium/state_trackers/xa/xa_composite.c
+++ b/src/gallium/state_trackers/xa/xa_composite.c
@@ -213,7 +213,7 @@ xa_is_filter_accelerated(struct xa_picture *pic)
return 1;
}
-int
+XA_EXPORT int
xa_composite_check_accelerated(const struct xa_composite *comp)
{
struct xa_composite_blend blend;
@@ -448,7 +448,7 @@ bind_samplers(struct xa_context *ctx,
ctx->bound_sampler_views);
}
-int
+XA_EXPORT int
xa_composite_prepare(struct xa_context *ctx,
const struct xa_composite *comp)
{
@@ -482,9 +482,10 @@ xa_composite_prepare(struct xa_context *ctx,
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,
@@ -505,7 +506,7 @@ void xa_composite_rect(struct xa_context *ctx,
}
}
-void
+XA_EXPORT void
xa_composite_done(struct xa_context *ctx)
{
renderer_draw_flush(ctx);
@@ -522,7 +523,7 @@ static const struct xa_composite_allocation a = {
.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;
diff --git a/src/gallium/state_trackers/xa/xa_context.c b/src/gallium/state_trackers/xa/xa_context.c
index b52ee27f43e..8290e0fa8b3 100644
--- a/src/gallium/state_trackers/xa/xa_context.c
+++ b/src/gallium/state_trackers/xa/xa_context.c
@@ -35,13 +35,13 @@
#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));
@@ -55,7 +55,7 @@ xa_context_create(struct xa_tracker *xa)
return ctx;
}
-void
+XA_EXPORT void
xa_context_destroy(struct xa_context *r)
{
struct pipe_resource **vsbuf = &r->vs_const_buffer;
@@ -83,7 +83,7 @@ xa_context_destroy(struct xa_context *r)
r->pipe->destroy(r->pipe);
}
-int
+XA_EXPORT int
xa_surface_dma(struct xa_context *ctx,
struct xa_surface *srf,
void *data,
@@ -132,7 +132,7 @@ xa_surface_dma(struct xa_context *ctx,
return -XA_ERR_NORES;
}
-void *
+XA_EXPORT void *
xa_surface_map(struct xa_context *ctx,
struct xa_surface *srf, unsigned int usage)
{
@@ -168,7 +168,7 @@ xa_surface_map(struct xa_context *ctx,
return map;
}
-void
+XA_EXPORT void
xa_surface_unmap(struct xa_surface *srf)
{
if (srf->transfer) {
@@ -209,7 +209,7 @@ xa_ctx_srf_destroy(struct xa_context *ctx)
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)
{
@@ -232,7 +232,7 @@ xa_copy_prepare(struct xa_context *ctx,
return 0;
}
-void
+XA_EXPORT void
xa_copy(struct xa_context *ctx,
int dx, int dy, int sx, int sy, int width, int height)
{
@@ -250,7 +250,7 @@ xa_copy(struct xa_context *ctx,
(float) ctx->src->tex->height0);
}
-void
+XA_EXPORT void
xa_copy_done(struct xa_context *ctx)
{
if (!ctx->simple_copy) {
@@ -277,7 +277,7 @@ bind_solid_blend_state(struct xa_context *ctx)
cso_set_blend(ctx->cso, &blend);
}
-int
+XA_EXPORT int
xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
uint32_t fg)
{
@@ -326,13 +326,13 @@ xa_solid_prepare(struct xa_context *ctx, struct xa_surface *dst,
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);
@@ -343,7 +343,7 @@ xa_solid_done(struct xa_context *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));
@@ -362,7 +362,7 @@ xa_fence_get(struct xa_context *ctx)
return fence;
}
-int
+XA_EXPORT int
xa_fence_wait(struct xa_fence *fence, uint64_t timeout)
{
if (!fence)
@@ -381,7 +381,7 @@ xa_fence_wait(struct xa_fence *fence, uint64_t timeout)
return XA_ERR_NONE;
}
-void
+XA_EXPORT void
xa_fence_destroy(struct xa_fence *fence)
{
if (!fence)
diff --git a/src/gallium/state_trackers/xa/xa_priv.h b/src/gallium/state_trackers/xa/xa_priv.h
index a281c907f88..d00114f99b5 100644
--- a/src/gallium/state_trackers/xa/xa_priv.h
+++ b/src/gallium/state_trackers/xa/xa_priv.h
@@ -38,6 +38,12 @@
#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
diff --git a/src/gallium/state_trackers/xa/xa_tracker.c b/src/gallium/state_trackers/xa/xa_tracker.c
index 529279ad865..8bd40ddc7d2 100644
--- a/src/gallium/state_trackers/xa/xa_tracker.c
+++ b/src/gallium/state_trackers/xa/xa_tracker.c
@@ -133,7 +133,7 @@ xa_get_pipe_format(enum xa_formats xa_format)
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));
@@ -194,7 +194,7 @@ xa_tracker_create(int drm_fd)
return NULL;
}
-void
+XA_EXPORT void
xa_tracker_destroy(struct xa_tracker *xa)
{
free(xa->supported_formats);
@@ -254,7 +254,7 @@ xa_get_format_stype_depth(struct xa_tracker *xa,
return fdesc;
}
-int
+XA_EXPORT int
xa_format_check_supported(struct xa_tracker *xa,
enum xa_formats xa_format, unsigned int flags)
{
@@ -279,7 +279,7 @@ xa_format_check_supported(struct xa_tracker *xa,
return XA_ERR_NONE;
}
-struct xa_surface *
+XA_EXPORT struct xa_surface *
xa_surface_create(struct xa_tracker *xa,
int width,
int height,
@@ -334,7 +334,7 @@ xa_surface_create(struct xa_tracker *xa,
return NULL;
}
-int
+XA_EXPORT int
xa_surface_redefine(struct xa_surface *srf,
int width,
int height,
@@ -418,14 +418,14 @@ xa_surface_redefine(struct xa_surface *srf,
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;
@@ -433,7 +433,7 @@ xa_tracker_version(int *major, int *minor, int *patch)
*patch = XA_TRACKER_VERSION_PATCH;
}
-extern int
+XA_EXPORT int
xa_surface_handle(struct xa_surface *srf,
uint32_t * handle, unsigned int *stride)
{
@@ -454,7 +454,7 @@ xa_surface_handle(struct xa_surface *srf,
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;
diff --git a/src/gallium/state_trackers/xa/xa_yuv.c b/src/gallium/state_trackers/xa/xa_yuv.c
index a5a4010e524..da00b116ade 100644
--- a/src/gallium/state_trackers/xa/xa_yuv.c
+++ b/src/gallium/state_trackers/xa/xa_yuv.c
@@ -105,7 +105,7 @@ xa_yuv_fs_constants(struct xa_context *r, const float conversion_matrix[])
conversion_matrix, param_bytes);
}
-extern int
+XA_EXPORT int
xa_yuv_planar_blit(struct xa_context *r,
int src_x,
int src_y,
diff --git a/src/gallium/targets/xa-vmwgfx/Makefile b/src/gallium/targets/xa-vmwgfx/Makefile
index 1f839d26bff..a4c02d1bca0 100644
--- a/src/gallium/targets/xa-vmwgfx/Makefile
+++ b/src/gallium/targets/xa-vmwgfx/Makefile
@@ -6,7 +6,7 @@ include $(TOP)/configs/current
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 \
@@ -45,7 +45,7 @@ endif
##### RULES #####
.c.o:
- $(CC) -c $(XA_CFLAGS) $(XA_INCLUDES) $<
+ $(CC) -c $(XA_CFLAGS) $(CFLAGS) $(XA_INCLUDES) $<
##### TARGETS #####