SConscript('state_trackers/dri/SConscript')
SConscript('state_trackers/xorg/SConscript')
SConscript('state_trackers/egl/SConscript')
+ SConscript('state_trackers/vega/SConscript')
if platform == 'windows':
SConscript('state_trackers/wgl/SConscript')
--- /dev/null
+#######################################################################
+# SConscript for vega state_tracker
+
+Import('*')
+
+if 'egl' in env['statetrackers']:
+
+ env = env.Clone()
+
+ env.Append(CPPPATH = [
+ '#/src/mapi',
+ ])
+
+ vega_sources = [
+ 'api.c',
+ 'api_context.c',
+ 'api_filters.c',
+ 'api_images.c',
+ 'api_masks.c',
+ 'api_misc.c',
+ 'api_paint.c',
+ 'api_params.c',
+ 'api_path.c',
+ 'api_text.c',
+ 'api_transform.c',
+ 'vgu.c',
+ 'vg_context.c',
+ 'vg_manager.c',
+ 'vg_state.c',
+ 'vg_translate.c',
+ 'polygon.c',
+ 'bezier.c',
+ 'path.c',
+ 'paint.c',
+ 'arc.c',
+ 'image.c',
+ 'renderer.c',
+ 'stroker.c',
+ 'mask.c',
+ 'shader.c',
+ 'shaders_cache.c',
+ ]
+
+ # vgapi_header must be generated first
+ env.Depends(vega_sources, vgapi_header)
+
+ st_vega = env.ConvenienceLibrary(
+ target = 'st_vega',
+ source = vega_sources,
+ )
+ Export('st_vega')
#include "util/u_format.h"
#include "util/u_memory.h"
#include "util/u_sampler.h"
+#include "util/u_string.h"
#include "asm_filters.h"
VGint num_consts = (VGint)(long)(user_data);
struct vg_shader *shader;
- snprintf(buffer, 1023, convolution_asm, num_consts, num_consts / 2 + 1);
+ util_snprintf(buffer, 1023, convolution_asm, num_consts, num_consts / 2 + 1);
shader = shader_create_from_text(ctx->pipe, buffer, 200,
PIPE_SHADER_FRAGMENT);
switch(channel) {
case VG_RED:
- snprintf(buffer, 1023, lookup_single_asm, "xxxx");
+ util_snprintf(buffer, 1023, lookup_single_asm, "xxxx");
break;
case VG_GREEN:
- snprintf(buffer, 1023, lookup_single_asm, "yyyy");
+ util_snprintf(buffer, 1023, lookup_single_asm, "yyyy");
break;
case VG_BLUE:
- snprintf(buffer, 1023, lookup_single_asm, "zzzz");
+ util_snprintf(buffer, 1023, lookup_single_asm, "zzzz");
break;
case VG_ALPHA:
- snprintf(buffer, 1023, lookup_single_asm, "wwww");
+ util_snprintf(buffer, 1023, lookup_single_asm, "wwww");
break;
default:
debug_assert(!"Unknown color channel");
#include "path_utils.h"
#include "polygon.h"
-#include "math.h"
+#include "util/u_math.h"
#ifndef M_2PI
#define M_2PI 6.28318530717958647692528676655900576
VGboolean cap_first,
VGfloat *start_tangent)
{
- const int MAX_OFFSET = 16;
+#define MAX_OFFSET 16
struct bezier offset_curves[MAX_OFFSET];
VGPathCommand first_element;
VGfloat start[2], prev[2];
#endif
return VG_FALSE;
}
+#undef MAX_OFFSET
}
static void stroker_process_subpath(struct stroker *stroker)