summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/api_filters.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-16 18:12:37 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-07 10:41:12 +0800
commit75143ef05576ee9f25ee176bc28c3c4d03705bf5 (patch)
treed8d1bd7f30088a95c8d773a8544a5c29fdcdde0f /src/gallium/state_trackers/vega/api_filters.c
parentbdc4504252692b2eb971c08114182828870cc0f8 (diff)
st/vega: Use vgapi.
Rename vgFooBar to vegaFooBar and use vgapi as the dispatcher. This makes sure there is always a current context when the internal functions are called. And eglGetProcAddress is finally supported.
Diffstat (limited to 'src/gallium/state_trackers/vega/api_filters.c')
-rw-r--r--src/gallium/state_trackers/vega/api_filters.c69
1 files changed, 35 insertions, 34 deletions
diff --git a/src/gallium/state_trackers/vega/api_filters.c b/src/gallium/state_trackers/vega/api_filters.c
index b1c08af938..144fb8f323 100644
--- a/src/gallium/state_trackers/vega/api_filters.c
+++ b/src/gallium/state_trackers/vega/api_filters.c
@@ -28,6 +28,7 @@
#include "vg_context.h"
#include "image.h"
+#include "api.h"
#include "renderer.h"
#include "shaders_cache.h"
#include "st_inlines.h"
@@ -361,8 +362,8 @@ static void execute_filter(struct vg_context *ctx,
pipe_surface_reference(&dst_surf, NULL);
}
-void vgColorMatrix(VGImage dst, VGImage src,
- const VGfloat * matrix)
+void vegaColorMatrix(VGImage dst, VGImage src,
+ const VGfloat * matrix)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *d, *s;
@@ -403,13 +404,13 @@ static VGfloat texture_offset(VGfloat width, VGint kernelSize, VGint current, VG
return diff / width;
}
-void vgConvolve(VGImage dst, VGImage src,
- VGint kernelWidth, VGint kernelHeight,
- VGint shiftX, VGint shiftY,
- const VGshort * kernel,
- VGfloat scale,
- VGfloat bias,
- VGTilingMode tilingMode)
+void vegaConvolve(VGImage dst, VGImage src,
+ VGint kernelWidth, VGint kernelHeight,
+ VGint shiftX, VGint shiftY,
+ const VGshort * kernel,
+ VGfloat scale,
+ VGfloat bias,
+ VGTilingMode tilingMode)
{
struct vg_context *ctx = vg_current_context();
VGfloat *buffer;
@@ -508,15 +509,15 @@ void vgConvolve(VGImage dst, VGImage src,
free(buffer);
}
-void vgSeparableConvolve(VGImage dst, VGImage src,
- VGint kernelWidth,
- VGint kernelHeight,
- VGint shiftX, VGint shiftY,
- const VGshort * kernelX,
- const VGshort * kernelY,
- VGfloat scale,
- VGfloat bias,
- VGTilingMode tilingMode)
+void vegaSeparableConvolve(VGImage dst, VGImage src,
+ VGint kernelWidth,
+ VGint kernelHeight,
+ VGint shiftX, VGint shiftY,
+ const VGshort * kernelX,
+ const VGshort * kernelY,
+ VGfloat scale,
+ VGfloat bias,
+ VGTilingMode tilingMode)
{
struct vg_context *ctx = vg_current_context();
VGshort *kernel;
@@ -600,10 +601,10 @@ static void compute_gaussian_kernel(VGfloat *kernel,
}
}
-void vgGaussianBlur(VGImage dst, VGImage src,
- VGfloat stdDeviationX,
- VGfloat stdDeviationY,
- VGTilingMode tilingMode)
+void vegaGaussianBlur(VGImage dst, VGImage src,
+ VGfloat stdDeviationX,
+ VGfloat stdDeviationY,
+ VGTilingMode tilingMode)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *d, *s;
@@ -699,13 +700,13 @@ void vgGaussianBlur(VGImage dst, VGImage src,
free(kernel);
}
-void vgLookup(VGImage dst, VGImage src,
- const VGubyte * redLUT,
- const VGubyte * greenLUT,
- const VGubyte * blueLUT,
- const VGubyte * alphaLUT,
- VGboolean outputLinear,
- VGboolean outputPremultiplied)
+void vegaLookup(VGImage dst, VGImage src,
+ const VGubyte * redLUT,
+ const VGubyte * greenLUT,
+ const VGubyte * blueLUT,
+ const VGubyte * alphaLUT,
+ VGboolean outputLinear,
+ VGboolean outputPremultiplied)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *d, *s;
@@ -758,11 +759,11 @@ void vgLookup(VGImage dst, VGImage src,
pipe_sampler_view_reference(&lut_texture_view, NULL);
}
-void vgLookupSingle(VGImage dst, VGImage src,
- const VGuint * lookupTable,
- VGImageChannel sourceChannel,
- VGboolean outputLinear,
- VGboolean outputPremultiplied)
+void vegaLookupSingle(VGImage dst, VGImage src,
+ const VGuint * lookupTable,
+ VGImageChannel sourceChannel,
+ VGboolean outputLinear,
+ VGboolean outputPremultiplied)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *d, *s;