101e04c3fSmrg/********************************************************** 201e04c3fSmrg * Copyright 2014 VMware, Inc. All rights reserved. 301e04c3fSmrg * 401e04c3fSmrg * Permission is hereby granted, free of charge, to any person 501e04c3fSmrg * obtaining a copy of this software and associated documentation 601e04c3fSmrg * files (the "Software"), to deal in the Software without 701e04c3fSmrg * restriction, including without limitation the rights to use, copy, 801e04c3fSmrg * modify, merge, publish, distribute, sublicense, and/or sell copies 901e04c3fSmrg * of the Software, and to permit persons to whom the Software is 1001e04c3fSmrg * furnished to do so, subject to the following conditions: 1101e04c3fSmrg * 1201e04c3fSmrg * The above copyright notice and this permission notice shall be 1301e04c3fSmrg * included in all copies or substantial portions of the Software. 1401e04c3fSmrg * 1501e04c3fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 1601e04c3fSmrg * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1701e04c3fSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 1801e04c3fSmrg * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 1901e04c3fSmrg * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 2001e04c3fSmrg * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 2101e04c3fSmrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 2201e04c3fSmrg * SOFTWARE. 2301e04c3fSmrg * 2401e04c3fSmrg **********************************************************/ 2501e04c3fSmrg 2601e04c3fSmrg#ifndef SVGA_STREAMOUT_H 2701e04c3fSmrg#define SVGA_STREAMOUT_H 2801e04c3fSmrg 2901e04c3fSmrgstruct svga_shader; 3001e04c3fSmrg 3101e04c3fSmrgstruct svga_stream_output { 3201e04c3fSmrg struct pipe_stream_output_info info; 3301e04c3fSmrg unsigned pos_out_index; // position output index 3401e04c3fSmrg unsigned id; 357ec681f3Smrg unsigned streammask; // bitmask to specify which streams are enabled 367ec681f3Smrg unsigned buffer_stream; 377ec681f3Smrg struct svga_winsys_buffer *declBuf; 3801e04c3fSmrg}; 3901e04c3fSmrg 4001e04c3fSmrgstruct svga_stream_output * 4101e04c3fSmrgsvga_create_stream_output(struct svga_context *svga, 4201e04c3fSmrg struct svga_shader *shader, 4301e04c3fSmrg const struct pipe_stream_output_info *info); 4401e04c3fSmrg 4501e04c3fSmrgenum pipe_error 4601e04c3fSmrgsvga_set_stream_output(struct svga_context *svga, 4701e04c3fSmrg struct svga_stream_output *streamout); 4801e04c3fSmrg 4901e04c3fSmrgvoid 5001e04c3fSmrgsvga_delete_stream_output(struct svga_context *svga, 5101e04c3fSmrg struct svga_stream_output *streamout); 5201e04c3fSmrg 5301e04c3fSmrgenum pipe_error 5401e04c3fSmrgsvga_rebind_stream_output_targets(struct svga_context *svga); 5501e04c3fSmrg 567ec681f3Smrgvoid 577ec681f3Smrgsvga_create_stream_output_queries(struct svga_context *svga); 587ec681f3Smrg 597ec681f3Smrgvoid 607ec681f3Smrgsvga_destroy_stream_output_queries(struct svga_context *svga); 617ec681f3Smrg 627ec681f3Smrgvoid 637ec681f3Smrgsvga_begin_stream_output_queries(struct svga_context *svga, unsigned mask); 647ec681f3Smrg 657ec681f3Smrgvoid 667ec681f3Smrgsvga_end_stream_output_queries(struct svga_context *svga, unsigned mask); 677ec681f3Smrg 687ec681f3Smrgunsigned 697ec681f3Smrgsvga_get_primcount_from_stream_output(struct svga_context *svga, 707ec681f3Smrg unsigned stream); 717ec681f3Smrg 7201e04c3fSmrg#endif /* SVGA_STREAMOUT_H */ 73