From b704c9a75baf113488a4e95d954c4c75427b2b46 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Fri, 26 Oct 2018 12:45:44 -0700 Subject: [PATCH] intel/blorp: Split out ps specific sampler state into a separate function The compute path will use blorp_emit_sampler_state, whereas the render path will use blorp_emit_sampler_state_ps. Signed-off-by: Jordan Justen Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Part-of: --- src/intel/blorp/blorp_genX_exec.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/intel/blorp/blorp_genX_exec.h b/src/intel/blorp/blorp_genX_exec.h index fa5c04a910b..71eca46e8ff 100644 --- a/src/intel/blorp/blorp_genX_exec.h +++ b/src/intel/blorp/blorp_genX_exec.h @@ -640,6 +640,14 @@ blorp_emit_sampler_state(struct blorp_batch *batch) #endif } + return offset; +} + +UNUSED static uint32_t +blorp_emit_sampler_state_ps(struct blorp_batch *batch) +{ + uint32_t offset = blorp_emit_sampler_state(batch); + #if GFX_VER >= 7 blorp_emit(batch, GENX(3DSTATE_SAMPLER_STATE_POINTERS_PS), ssp) { ssp.PointertoPSSamplerState = offset; @@ -1322,7 +1330,7 @@ blorp_emit_pipeline(struct blorp_batch *batch, #endif if (params->src.enabled) - blorp_emit_sampler_state(batch); + blorp_emit_sampler_state_ps(batch); blorp_emit_3dstate_multisample(batch, params);