updated xschemtest.tcl with new hashes

This commit is contained in:
Stefan Frederik 2021-12-22 11:11:46 +01:00
parent 76b537a587
commit e0cad38f17
5 changed files with 72 additions and 28 deletions

View File

@ -93,6 +93,42 @@ int find_gl(const char *name, int logdepth, int fatal, const char *call, const c
return 0;
}
int find_gl_vao(const char *name, int logdepth, int fatal, const char *call, const char *arg)
{
const char *test_c =
NL "#include <stdio.h>"
NL "int main()"
NL "{"
NL " glBindVertexArray(0);"
NL " return 0;"
NL "}"
NL;
const char *node = "libs/gui/gl/vao";
const char *cflags, *ldflags, *incs;
(void) call; /* not used */
(void) arg; /* not used */
if (require("cc/cc", logdepth, fatal))
return try_fail(logdepth, node);
if (require("libs/gui/gl/*", logdepth, fatal))
return try_fail(logdepth, node);
cflags = get("libs/gui/gl/cflags");
ldflags = get("libs/gui/gl/ldflags");
incs = get("libs/gui/gl/includes");
report("Checking for gl vao... ");
logprintf(logdepth, "find_gl_vao...\n");
logdepth++;
if (try_icl_norun(logdepth, node, test_c, incs, cflags, ldflags) != 0)
return 0;
return try_fail(logdepth, node);
}
int find_glu(const char *name, int logdepth, int fatal, const char *call, const char *arg)
{
char test_c[256];

View File

@ -1,4 +1,6 @@
int find_gl(const char *name, int logdepth, int fatal);
int find_gl_vao(const char *name, int logdepth, int fatal);
int find_glu(const char *name, int logdepth, int fatal);
int find_glut(const char *name, int logdepth, int fatal);
int find_gui_wgl(const char *name, int logdepth, int fatal);

View File

@ -41,6 +41,7 @@ void deps_gui_init()
dep_add("libs/gui/cairo/*", find_cairo);
dep_add("libs/gui/cairo-xcb/*", find_cairo_xcb);
dep_add("libs/gui/gl/*", find_gl);
dep_add("libs/gui/gl/vao/*", find_gl_vao);
dep_add("libs/gui/glu/*", find_glu);
dep_add("libs/gui/glut/*", find_glut);
dep_add("libs/gui/wgl/*", find_gui_wgl);

View File

@ -1219,8 +1219,8 @@ void polygon_bbox(double *x, double *y, int points, double *bx1, double *by1, do
int j;
for(j=0; j<points; j++) {
if(j==0 || x[j] < *bx1) *bx1 = x[j];
if(j==0 || y[j] < *by1) *by1 = y[j];
if(j==0 || x[j] > *bx2) *bx2 = x[j];
if(j==0 || y[j] < *by1) *by1 = y[j];
if(j==0 || y[j] > *by2) *by2 = y[j];
}
}
@ -1294,8 +1294,8 @@ void drawpolygon(int c, int what, double *x, double *y, int points, int poly_fil
polygon_bbox(x, y, points, &x1,&y1,&x2,&y2);
x1=X_TO_SCREEN(x1);
y1=Y_TO_SCREEN(y1);
x2=X_TO_SCREEN(x2);
y1=Y_TO_SCREEN(y1);
y2=Y_TO_SCREEN(y2);
if( !rectclip(xctx->areax1,xctx->areay1,xctx->areax2,xctx->areay2,&x1,&y1,&x2,&y2) ) {
return;
@ -1772,32 +1772,35 @@ void draw_graph(int c, int i)
double start = (wx1 <= wx2) ? wx1 : wx2;
double end = (wx1 <= wx2) ? wx2 : wx1;
/* Process "npoints" simulation items
* p loop split repeated 2 timed (for xx and yy points) to preserve cache locality */
for(p = 0 ; p < xctx->npoints; p++) {
xx = xctx->values[0][p];
if(xx > end) {
break;
/* skip if nothing in viewport */
if(xctx->values[0][xctx->npoints -1] > start) {
/* Process "npoints" simulation items
* p loop split repeated 2 timed (for xx and yy points) to preserve cache locality */
for(p = 0 ; p < xctx->npoints; p++) {
xx = xctx->values[0][p];
if(xx > end) {
break;
}
if(xx >= start) {
if(first == -1) first = p;
/* Build poly x array. Translate from graph coordinates to {x1,y1} - {x2, y2} world. */
xarr[poly_npoints] = W_X(xx);
poly_npoints++;
}
}
if(xx >= start) {
if(first == -1) first = p;
/* Build poly x array. Translate from graph coordinates to {x1,y1} - {x2, y2} world. */
xarr[poly_npoints] = W_X(xx);
poly_npoints++;
last = p;
if(first != -1) {
poly_npoints = 0;
for(p = first ; p < last; p++) {
yy = xctx->values[v][p];
/* Build poly y array. Translate from graph coordinates to {x1,y1} - {x2, y2} world. */
yarr[poly_npoints] = W_Y(yy);
poly_npoints++;
}
/* plot data */
drawpolygon(wave_color, NOW, xarr, yarr, poly_npoints, 0, 0);
}
}
last = p;
if(first != -1) {
poly_npoints = 0;
for(p = first ; p < last; p++) {
yy = xctx->values[v][p];
/* Build poly y array. Translate from graph coordinates to {x1,y1} - {x2, y2} world. */
yarr[poly_npoints] = W_Y(yy);
poly_npoints++;
}
/* plot data */
drawpolygon(wave_color, NOW, xarr, yarr, poly_npoints, 0, 0);
}
}
bbox(END, 0.0, 0.0, 0.0, 0.0);
wcnt++;

View File

@ -17,11 +17,13 @@
## allows to see differences in number of function calls / time spent.
## move schematic and redraw in a loop.
proc draw_test {filelist} {
proc draw_test {{filelist {-}}} {
global show_pin_net_names
set show_pin_net_names 1
foreach f $filelist {
xschem load [abs_sym_path $f]
if { $f ne {-}} {
xschem load [abs_sym_path $f]
}
xschem search regex 1 lab . ;# select all nets
xschem hilight ;# hilight all selected nets and labels
xschem unselect_all
@ -161,7 +163,7 @@ proc netlist_test {} {
loading.sch vhdl 2601437773
mos_power_ampli.sch spice 1186348644
hierarchical_tedax.sch tedax 998070173
LCC_instances.sch spice 824427889
LCC_instances.sch spice 3014344057
pcb_test1.sch tedax 1295717013
simulate_ff.sch spice 1321596936
} {