X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_setup_vbuf.c;h=89992007849452513f8000b9924cc0d23c5eae10;hb=2f2d1b3d9b090aeba316d6c425c23e92340b5502;hp=1ea6bcf5b005adcbb869655d2cbd5ccd7dbac1ae;hpb=27cedd8aecccea808a35ef297477cac5fe87e476;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c index 1ea6bcf5b00..89992007849 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_vbuf.c @@ -1,6 +1,6 @@ /************************************************************************** * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * Copyright 2007 VMware, Inc. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -18,7 +18,7 @@ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -534,17 +534,23 @@ lp_setup_vbuf_destroy(struct vbuf_render *vbr) lp_setup_destroy(setup); } +/* + * FIXME: it is unclear if primitives_storage_needed (which is generally + * the same as pipe query num_primitives_generated) should increase + * if SO is disabled for d3d10, but for GL we definitely need to + * increase num_primitives_generated and this is only called for active + * SO. If it must not increase for d3d10 need to disambiguate the counters + * in the driver and do some work for getting correct values, if it should + * increase too should call this from outside streamout code. + */ static void -lp_setup_so_info(struct vbuf_render *vbr, uint primitives, uint vertices, - uint prim_generated) +lp_setup_so_info(struct vbuf_render *vbr, uint primitives, uint prim_generated) { struct lp_setup_context *setup = lp_setup_context(vbr); struct llvmpipe_context *lp = llvmpipe_context(setup->pipe); lp->so_stats.num_primitives_written += primitives; - lp->so_stats.primitives_storage_needed = - vertices * 4 /*sizeof(float|int32)*/ * 4 /*x,y,z,w*/; - lp->num_primitives_generated += prim_generated; + lp->so_stats.primitives_storage_needed += prim_generated; } static void