etnaviv: add deqp debug option
This new debug option will fake some driver CAPs to be able to run dEQP for GLES3. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Jonathan Marek <jonathan@marek.ca> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3351> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3351>
This commit is contained in:
@@ -54,6 +54,7 @@
|
|||||||
#define ETNA_DBG_SHADERDB 0x800000 /* dump program compile information */
|
#define ETNA_DBG_SHADERDB 0x800000 /* dump program compile information */
|
||||||
#define ETNA_DBG_NO_SINGLEBUF 0x1000000 /* disable single buffer feature */
|
#define ETNA_DBG_NO_SINGLEBUF 0x1000000 /* disable single buffer feature */
|
||||||
#define ETNA_DBG_NIR 0x2000000 /* use new NIR compiler */
|
#define ETNA_DBG_NIR 0x2000000 /* use new NIR compiler */
|
||||||
|
#define ETNA_DBG_DEQP 0x4000000 /* Hacks to run dEQP GLES3 tests */
|
||||||
|
|
||||||
extern int etna_mesa_debug; /* set in etna_screen.c from ETNA_DEBUG */
|
extern int etna_mesa_debug; /* set in etna_screen.c from ETNA_DEBUG */
|
||||||
|
|
||||||
|
@@ -73,6 +73,7 @@ static const struct debug_named_value debug_options[] = {
|
|||||||
{"shaderdb", ETNA_DBG_SHADERDB, "Enable shaderdb output"},
|
{"shaderdb", ETNA_DBG_SHADERDB, "Enable shaderdb output"},
|
||||||
{"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"},
|
{"no_singlebuffer",ETNA_DBG_NO_SINGLEBUF, "Disable single buffer feature"},
|
||||||
{"nir", ETNA_DBG_NIR, "use new NIR compiler"},
|
{"nir", ETNA_DBG_NIR, "use new NIR compiler"},
|
||||||
|
{"deqp", ETNA_DBG_DEQP, "Hacks to run dEQP GLES3 tests"}, /* needs MESA_GLES_VERSION_OVERRIDE=3.0 */
|
||||||
DEBUG_NAMED_VALUE_END
|
DEBUG_NAMED_VALUE_END
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -180,6 +181,8 @@ etna_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Stream output. */
|
/* Stream output. */
|
||||||
|
case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS:
|
||||||
|
return DBG_ENABLED(ETNA_DBG_DEQP) ? 4 : 0;
|
||||||
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
|
case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS:
|
||||||
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
|
case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS:
|
||||||
return 0;
|
return 0;
|
||||||
@@ -312,7 +315,7 @@ etna_screen_get_shader_param(struct pipe_screen *pscreen,
|
|||||||
case PIPE_SHADER_CAP_MAX_TEMPS:
|
case PIPE_SHADER_CAP_MAX_TEMPS:
|
||||||
return 64; /* Max native temporaries. */
|
return 64; /* Max native temporaries. */
|
||||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
|
||||||
return 1;
|
return DBG_ENABLED(ETNA_DBG_DEQP) ? 16 : 1;
|
||||||
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
|
case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
|
||||||
return 1;
|
return 1;
|
||||||
case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
|
case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
|
||||||
@@ -614,6 +617,9 @@ etna_determine_uniform_limits(struct etna_screen *screen)
|
|||||||
screen->specs.max_vs_uniforms = 168;
|
screen->specs.max_vs_uniforms = 168;
|
||||||
screen->specs.max_ps_uniforms = 64;
|
screen->specs.max_ps_uniforms = 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DBG_ENABLED(ETNA_DBG_DEQP))
|
||||||
|
screen->specs.max_ps_uniforms = 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
Reference in New Issue
Block a user