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) 2012-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_3D_PIPELINE_GEN6_H
  29. #define ILO_3D_PIPELINE_GEN6_H
  30.  
  31. #include "ilo_common.h"
  32.  
  33. struct ilo_3d_pipeline;
  34. struct ilo_context;
  35.  
  36. struct gen6_pipeline_session {
  37.    uint32_t pipe_dirty;
  38.  
  39.    int reduced_prim;
  40.    int init_cp_space;
  41.  
  42.    bool hw_ctx_changed;
  43.    bool batch_bo_changed;
  44.    bool state_bo_changed;
  45.    bool kernel_bo_changed;
  46.    bool prim_changed;
  47.    bool primitive_restart_changed;
  48.  
  49.    void (*emit_draw_states)(struct ilo_3d_pipeline *p,
  50.                             const struct ilo_context *ilo,
  51.                             struct gen6_pipeline_session *session);
  52.  
  53.    void (*emit_draw_commands)(struct ilo_3d_pipeline *p,
  54.                               const struct ilo_context *ilo,
  55.                               struct gen6_pipeline_session *session);
  56.  
  57.    /* indirect states */
  58.    bool viewport_state_changed;
  59.    bool cc_state_blend_changed;
  60.    bool cc_state_dsa_changed;
  61.    bool cc_state_cc_changed;
  62.    bool scissor_state_changed;
  63.    bool binding_table_vs_changed;
  64.    bool binding_table_gs_changed;
  65.    bool binding_table_fs_changed;
  66.    bool sampler_state_vs_changed;
  67.    bool sampler_state_gs_changed;
  68.    bool sampler_state_fs_changed;
  69.    bool pcb_state_vs_changed;
  70.    bool pcb_state_gs_changed;
  71.    bool pcb_state_fs_changed;
  72.  
  73.    int num_surfaces[PIPE_SHADER_TYPES];
  74. };
  75.  
  76. void
  77. gen6_pipeline_prepare(const struct ilo_3d_pipeline *p,
  78.                       const struct ilo_context *ilo,
  79.                       struct gen6_pipeline_session *session);
  80.  
  81. void
  82. gen6_pipeline_draw(struct ilo_3d_pipeline *p,
  83.                    const struct ilo_context *ilo,
  84.                    struct gen6_pipeline_session *session);
  85.  
  86. void
  87. gen6_pipeline_end(struct ilo_3d_pipeline *p,
  88.                   const struct ilo_context *ilo,
  89.                   struct gen6_pipeline_session *session);
  90.  
  91. void
  92. gen6_pipeline_common_select(struct ilo_3d_pipeline *p,
  93.                             const struct ilo_context *ilo,
  94.                             struct gen6_pipeline_session *session);
  95.  
  96. void
  97. gen6_pipeline_common_sip(struct ilo_3d_pipeline *p,
  98.                          const struct ilo_context *ilo,
  99.                          struct gen6_pipeline_session *session);
  100.  
  101. void
  102. gen6_pipeline_common_base_address(struct ilo_3d_pipeline *p,
  103.                                   const struct ilo_context *ilo,
  104.                                   struct gen6_pipeline_session *session);
  105.  
  106. void
  107. gen6_pipeline_vf(struct ilo_3d_pipeline *p,
  108.                  const struct ilo_context *ilo,
  109.                  struct gen6_pipeline_session *session);
  110.  
  111. void
  112. gen6_pipeline_vf_statistics(struct ilo_3d_pipeline *p,
  113.                             const struct ilo_context *ilo,
  114.                             struct gen6_pipeline_session *session);
  115.  
  116. void
  117. gen6_pipeline_vf_draw(struct ilo_3d_pipeline *p,
  118.                       const struct ilo_context *ilo,
  119.                       struct gen6_pipeline_session *session);
  120.  
  121. void
  122. gen6_pipeline_vs(struct ilo_3d_pipeline *p,
  123.                  const struct ilo_context *ilo,
  124.                  struct gen6_pipeline_session *session);
  125.  
  126. void
  127. gen6_pipeline_clip(struct ilo_3d_pipeline *p,
  128.                    const struct ilo_context *ilo,
  129.                    struct gen6_pipeline_session *session);
  130.  
  131. void
  132. gen6_pipeline_sf_rect(struct ilo_3d_pipeline *p,
  133.                       const struct ilo_context *ilo,
  134.                       struct gen6_pipeline_session *session);
  135.  
  136. void
  137. gen6_pipeline_wm_raster(struct ilo_3d_pipeline *p,
  138.                         const struct ilo_context *ilo,
  139.                         struct gen6_pipeline_session *session);
  140.  
  141. void
  142. gen6_pipeline_states(struct ilo_3d_pipeline *p,
  143.                      const struct ilo_context *ilo,
  144.                      struct gen6_pipeline_session *session);
  145.  
  146. bool
  147. gen6_pipeline_update_max_svbi(struct ilo_3d_pipeline *p,
  148.                               const struct ilo_context *ilo,
  149.                               struct gen6_pipeline_session *session);
  150.  
  151. void
  152. ilo_3d_pipeline_emit_flush_gen6(struct ilo_3d_pipeline *p);
  153.  
  154. void
  155. ilo_3d_pipeline_emit_write_timestamp_gen6(struct ilo_3d_pipeline *p,
  156.                                           struct intel_bo *bo, int index);
  157.  
  158. void
  159. ilo_3d_pipeline_emit_write_depth_count_gen6(struct ilo_3d_pipeline *p,
  160.                                             struct intel_bo *bo, int index);
  161.  
  162. void
  163. ilo_3d_pipeline_init_gen6(struct ilo_3d_pipeline *p);
  164.  
  165. #endif /* ILO_3D_PIPELINE_GEN6_H */
  166.