Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. /*
  2.  * Mesa 3-D graphics library
  3.  *
  4.  * Copyright (C) 2013 LunarG, Inc.
  5.  *
  6.  * Permission is hereby granted, free of charge, to any person obtaining a
  7.  * copy of this software and associated documentation files (the "Software"),
  8.  * to deal in the Software without restriction, including without limitation
  9.  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10.  * and/or sell copies of the Software, and to permit persons to whom the
  11.  * Software is furnished to do so, subject to the following conditions:
  12.  *
  13.  * The above copyright notice and this permission notice shall be included
  14.  * in all copies or substantial portions of the Software.
  15.  *
  16.  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17.  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18.  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
  19.  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20.  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  21.  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  22.  * DEALINGS IN THE SOFTWARE.
  23.  *
  24.  * Authors:
  25.  *    Chia-I Wu <olv@lunarg.com>
  26.  */
  27.  
  28. #ifndef ILO_RENDER_H
  29. #define ILO_RENDER_H
  30.  
  31. #include "ilo_common.h"
  32.  
  33. struct pipe_constant_buffer;
  34. struct ilo_blitter;
  35. struct ilo_builder;
  36. struct ilo_query;
  37. struct ilo_render;
  38. struct ilo_state_vector;
  39.  
  40. struct ilo_render *
  41. ilo_render_create(struct ilo_builder *builder);
  42.  
  43. void
  44. ilo_render_destroy(struct ilo_render *render);
  45.  
  46. /**
  47.  * Estimate the size of an action.
  48.  */
  49. void
  50. ilo_render_get_sample_position(const struct ilo_render *render,
  51.                                unsigned sample_count,
  52.                                unsigned sample_index,
  53.                                float *x, float *y);
  54.  
  55. void
  56. ilo_render_invalidate_hw(struct ilo_render *render);
  57.  
  58. void
  59. ilo_render_invalidate_builder(struct ilo_render *render);
  60.  
  61. int
  62. ilo_render_get_flush_len(const struct ilo_render *render);
  63.  
  64. void
  65. ilo_render_emit_flush(struct ilo_render *render);
  66.  
  67. int
  68. ilo_render_get_query_len(const struct ilo_render *render,
  69.                          unsigned query_type);
  70.  
  71. void
  72. ilo_render_emit_query(struct ilo_render *render,
  73.                       struct ilo_query *q, uint32_t offset);
  74.  
  75. int
  76. ilo_render_get_rectlist_len(const struct ilo_render *render,
  77.                             const struct ilo_blitter *blitter);
  78.  
  79. void
  80. ilo_render_emit_rectlist(struct ilo_render *render,
  81.                          const struct ilo_blitter *blitter);
  82.  
  83. int
  84. ilo_render_get_draw_len(const struct ilo_render *render,
  85.                         const struct ilo_state_vector *vec);
  86.  
  87. void
  88. ilo_render_emit_draw(struct ilo_render *render,
  89.                      const struct ilo_state_vector *vec);
  90.  
  91. int
  92. ilo_render_get_launch_grid_len(const struct ilo_render *render,
  93.                                const struct ilo_state_vector *vec);
  94.  
  95. void
  96. ilo_render_emit_launch_grid(struct ilo_render *render,
  97.                             const struct ilo_state_vector *vec,
  98.                             const unsigned thread_group_offset[3],
  99.                             const unsigned thread_group_dim[3],
  100.                             unsigned thread_group_size,
  101.                             const struct pipe_constant_buffer *input,
  102.                             uint32_t pc);
  103.  
  104. #endif /* ILO_RENDER_H */
  105.