summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2014-05-28 23:37:44 -0700
committerKenneth Graunke <[email protected]>2014-06-05 01:25:56 -0700
commit7f3d64a77b9ca6d738f67c7a3dd4499cdf817d79 (patch)
tree81a3dadf7cdad119cdd861e67aacbce8faafdec9 /src/mesa/drivers
parentcf29913aa156accbe60cb35f9a0bd2c21726cfa3 (diff)
i965: Pass brw to translate_wrap_mode().
This lets us do generation checks. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Matt Turner <[email protected]> Cc: "10.2" <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/i965/brw_state.h3
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_sampler_state.c8
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sampler_state.c6
3 files changed, 9 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_state.h b/src/mesa/drivers/dri/i965/brw_state.h
index dbcf7c7cf87..c52a977623c 100644
--- a/src/mesa/drivers/dri/i965/brw_state.h
+++ b/src/mesa/drivers/dri/i965/brw_state.h
@@ -243,7 +243,8 @@ void gen7_upload_3dstate_so_decl_list(struct brw_context *brw,
void gen8_init_vtable_surface_functions(struct brw_context *brw);
/* brw_wm_sampler_state.c */
-uint32_t translate_wrap_mode(GLenum wrap, bool using_nearest);
+uint32_t translate_wrap_mode(struct brw_context *brw,
+ GLenum wrap, bool using_nearest);
void upload_default_color(struct brw_context *brw,
struct gl_sampler_object *sampler,
int unit,
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index bbfd9e053d8..6f8dde4a29b 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -46,7 +46,7 @@
uint32_t
-translate_wrap_mode(GLenum wrap, bool using_nearest)
+translate_wrap_mode(struct brw_context *brw, GLenum wrap, bool using_nearest)
{
switch( wrap ) {
case GL_REPEAT:
@@ -276,11 +276,11 @@ static void brw_update_sampler_state(struct brw_context *brw,
}
}
- sampler->ss1.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR,
+ sampler->ss1.r_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapR,
using_nearest);
- sampler->ss1.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS,
+ sampler->ss1.s_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapS,
using_nearest);
- sampler->ss1.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT,
+ sampler->ss1.t_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapT,
using_nearest);
if (brw->gen >= 6 &&
diff --git a/src/mesa/drivers/dri/i965/gen7_sampler_state.c b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
index 74d5e9e0a7e..6077ff20230 100644
--- a/src/mesa/drivers/dri/i965/gen7_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sampler_state.c
@@ -103,11 +103,11 @@ gen7_update_sampler_state(struct brw_context *brw, int unit, int ss_index,
}
}
- sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR,
+ sampler->ss3.r_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapR,
using_nearest);
- sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS,
+ sampler->ss3.s_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapS,
using_nearest);
- sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT,
+ sampler->ss3.t_wrap_mode = translate_wrap_mode(brw, gl_sampler->WrapT,
using_nearest);
/* Cube-maps on 965 and later must use the same wrap mode for all 3