[5/6] WineD3D: Support the full amount of constants in GLSL

Henri Verbeet hverbeet at gmail.com
Wed Apr 15 02:36:46 CDT 2009


2009/4/15 Stefan Dösinger <stefan at codeweavers.com>:
> +void record_const_read(DWORD reg, unsigned int *array, int *num) {
> +    int r;
> +    BOOL inc = TRUE;
> +    for(r = 0; r < *num; r++) {
> +        if(array[r] == reg) {
> +            inc = FALSE;
> +            break;
> +        }
> +    }
> +
> +    if(inc) {
> +        array[(*num)++] = reg;
> +    }
> +}
> +
This should be static. Using a bitmap and counting the bits would be nicer, imo.



More information about the wine-devel mailing list