mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 19:50:11 +01:00
i965/gen6/gs: use brw_gs_prog atom instead of brw_ff_gs_prog
This is needed to support user-provided geometry shaders, since the brw_ff_gs_prog atom in gen6 only takes care of implementing transform feedback for vertex shaders. If there is no user-provided geometry shader the implementation falls back to the original code. Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
dd376bdb25
commit
bc383cb55b
4 changed files with 16 additions and 2 deletions
|
|
@ -243,6 +243,10 @@ brw_upload_ff_gs_prog(struct brw_context *brw)
|
|||
}
|
||||
}
|
||||
|
||||
void gen6_brw_upload_ff_gs_prog(struct brw_context *brw)
|
||||
{
|
||||
brw_upload_ff_gs_prog(brw);
|
||||
}
|
||||
|
||||
const struct brw_tracked_state brw_ff_gs_prog = {
|
||||
.dirty = {
|
||||
|
|
|
|||
|
|
@ -110,5 +110,6 @@ void brw_ff_gs_lines(struct brw_ff_gs_compile *c);
|
|||
void gen6_sol_program(struct brw_ff_gs_compile *c,
|
||||
struct brw_ff_gs_prog_key *key,
|
||||
unsigned num_verts, bool check_edge_flag);
|
||||
void gen6_brw_upload_ff_gs_prog(struct brw_context *brw);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ static const struct brw_tracked_state *gen4_atoms[] =
|
|||
static const struct brw_tracked_state *gen6_atoms[] =
|
||||
{
|
||||
&brw_vs_prog, /* must do before state base address */
|
||||
&brw_ff_gs_prog, /* must do before state base address */
|
||||
&brw_gs_prog, /* must do before state base address */
|
||||
&brw_wm_prog, /* must do before state base address */
|
||||
|
||||
&gen6_clip_vp,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include "brw_context.h"
|
||||
#include "brw_vec4_gs_visitor.h"
|
||||
#include "brw_state.h"
|
||||
#include "brw_gs.h"
|
||||
|
||||
|
||||
static bool
|
||||
|
|
@ -272,6 +273,12 @@ brw_upload_gs_prog(struct brw_context *brw)
|
|||
(struct brw_geometry_program *) brw->geometry_program;
|
||||
|
||||
if (gp == NULL) {
|
||||
if (brw->gen == 6) {
|
||||
if (brw->state.dirty.brw & BRW_NEW_TRANSFORM_FEEDBACK)
|
||||
gen6_brw_upload_ff_gs_prog(brw);
|
||||
return;
|
||||
}
|
||||
|
||||
/* No geometry shader. Vertex data just passes straight through. */
|
||||
if (brw->state.dirty.brw & BRW_NEW_VUE_MAP_VS) {
|
||||
brw->vue_map_geom_out = brw->vue_map_vs;
|
||||
|
|
@ -327,7 +334,9 @@ brw_upload_gs_prog(struct brw_context *brw)
|
|||
const struct brw_tracked_state brw_gs_prog = {
|
||||
.dirty = {
|
||||
.mesa = (_NEW_LIGHT | _NEW_BUFFERS | _NEW_TEXTURE),
|
||||
.brw = BRW_NEW_GEOMETRY_PROGRAM | BRW_NEW_VUE_MAP_VS,
|
||||
.brw = (BRW_NEW_GEOMETRY_PROGRAM |
|
||||
BRW_NEW_VUE_MAP_VS |
|
||||
BRW_NEW_TRANSFORM_FEEDBACK),
|
||||
},
|
||||
.emit = brw_upload_gs_prog
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue