mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 18:20:30 +01:00
i965/blorp: Add support for layered rendering
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
parent
91daf9f09b
commit
dfd896699d
4 changed files with 9 additions and 5 deletions
|
|
@ -156,7 +156,8 @@ brw_blorp_surface_info::compute_tile_offsets(uint32_t *tile_x,
|
|||
|
||||
|
||||
brw_blorp_params::brw_blorp_params(unsigned num_varyings,
|
||||
unsigned num_draw_buffers)
|
||||
unsigned num_draw_buffers,
|
||||
unsigned num_layers)
|
||||
: x0(0),
|
||||
y0(0),
|
||||
x1(0),
|
||||
|
|
@ -165,7 +166,8 @@ brw_blorp_params::brw_blorp_params(unsigned num_varyings,
|
|||
hiz_op(GEN6_HIZ_OP_NONE),
|
||||
use_wm_prog(false),
|
||||
num_varyings(num_varyings),
|
||||
num_draw_buffers(num_draw_buffers)
|
||||
num_draw_buffers(num_draw_buffers),
|
||||
num_layers(num_layers)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -212,7 +212,8 @@ class brw_blorp_params
|
|||
{
|
||||
public:
|
||||
brw_blorp_params(unsigned num_varyings = 0,
|
||||
unsigned num_draw_buffers = 1);
|
||||
unsigned num_draw_buffers = 1,
|
||||
unsigned num_layers = 1);
|
||||
|
||||
virtual uint32_t get_wm_prog(struct brw_context *brw,
|
||||
brw_blorp_prog_data **prog_data) const = 0;
|
||||
|
|
@ -230,6 +231,7 @@ public:
|
|||
brw_blorp_wm_push_constants wm_push_consts;
|
||||
const unsigned num_varyings;
|
||||
const unsigned num_draw_buffers;
|
||||
const unsigned num_layers;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ gen6_blorp_emit_primitive(struct brw_context *brw,
|
|||
GEN4_3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL);
|
||||
OUT_BATCH(3); /* vertex count per instance */
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(1); /* instance count */
|
||||
OUT_BATCH(params->num_layers); /* instance count */
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
ADVANCE_BATCH();
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ gen7_blorp_emit_primitive(struct brw_context *brw,
|
|||
_3DPRIM_RECTLIST);
|
||||
OUT_BATCH(3); /* vertex count per instance */
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(1); /* instance count */
|
||||
OUT_BATCH(params->num_layers); /* instance count */
|
||||
OUT_BATCH(0);
|
||||
OUT_BATCH(0);
|
||||
ADVANCE_BATCH();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue