st/vega: Use vgapi.
[mesa.git] / src / gallium / state_trackers / vega / api_filters.c
index b1c08af9382c4b5e52cb8adf2d3399eb17a78c20..144fb8f323d881479f5c39bd7eeab9276bc30847 100644 (file)
@@ -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;