aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe/sp_tex_sample.c
diff options
context:
space:
mode:
authorGert Wollny <[email protected]>2019-04-19 08:43:05 +0200
committerGert Wollny <[email protected]>2019-05-01 08:22:47 +0200
commit724a73509e1bc1ce3abf9500e457bb2911b642db (patch)
tree7f06c7fe818cc0f564b85f7bd079c479e2e589bc /src/gallium/drivers/softpipe/sp_tex_sample.c
parent7c004d093abcc9b1e147966403daa7edcc13bd92 (diff)
softpipe: Prepare handling explicit gradients
This only adds corde that is not yet enabled. Signed-off-by: Gert Wollny <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_sample.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index ce702c9bb78..bfd10b0736d 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -659,6 +659,39 @@ compute_lambda_vert(const struct sp_sampler_view *sview,
}
+static float
+compute_lambda_vert_explicite_gradients(UNUSED const struct sp_sampler_view *sview,
+ UNUSED const float derivs[3][2][TGSI_QUAD_SIZE],
+ UNUSED int quad)
+{
+ return 0.0f;
+}
+
+
+compute_lambda_from_grad_func
+softpipe_get_lambda_from_grad_func(const struct pipe_sampler_view *view,
+ enum pipe_shader_type shader)
+{
+ switch (view->target) {
+ case PIPE_BUFFER:
+ case PIPE_TEXTURE_1D:
+ case PIPE_TEXTURE_1D_ARRAY:
+ return compute_lambda_1d_explicit_gradients;
+ case PIPE_TEXTURE_2D:
+ case PIPE_TEXTURE_2D_ARRAY:
+ case PIPE_TEXTURE_RECT:
+ return compute_lambda_2d_explicit_gradients;
+ case PIPE_TEXTURE_CUBE:
+ case PIPE_TEXTURE_CUBE_ARRAY:
+ return compute_lambda_cube_explicit_gradients;
+ case PIPE_TEXTURE_3D:
+ return compute_lambda_3d_explicit_gradients;
+ default:
+ assert(0);
+ return compute_lambda_1d_explicit_gradients;
+ }
+}
+
/**
* Get a texel from a texture, using the texture tile cache.