virgl: Only send the same amount of data than declared in pipe_sampler_state
Adjust the masks to only send the data that we are sure to actually use. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26856>
This commit is contained in:
parent
395dee0d89
commit
b8e06fa48a
2 changed files with 5 additions and 5 deletions
|
|
@ -1108,7 +1108,7 @@ int virgl_encode_sampler_state(struct virgl_context *ctx,
|
|||
VIRGL_OBJ_SAMPLE_STATE_S0_COMPARE_MODE(state->compare_mode) |
|
||||
VIRGL_OBJ_SAMPLE_STATE_S0_COMPARE_FUNC(state->compare_func) |
|
||||
VIRGL_OBJ_SAMPLE_STATE_S0_SEAMLESS_CUBE_MAP(state->seamless_cube_map) |
|
||||
VIRGL_OBJ_SAMPLE_STATE_S0_MAX_ANISOTROPY((int)(state->max_anisotropy));
|
||||
VIRGL_OBJ_SAMPLE_STATE_S0_MAX_ANISOTROPY(state->max_anisotropy);
|
||||
|
||||
virgl_encoder_write_dword(ctx->cbuf, tmp);
|
||||
virgl_encoder_write_dword(ctx->cbuf, fui(state->lod_bias));
|
||||
|
|
@ -1853,4 +1853,4 @@ int virgl_encode_clear_surface(struct virgl_context *ctx,
|
|||
virgl_encoder_write_dword(ctx->cbuf, height);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -388,13 +388,13 @@ enum virgl_shader_stage {
|
|||
#define VIRGL_OBJ_SAMPLE_STATE_S0_WRAP_S(x) (((x) & 0x7) << 0)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_WRAP_T(x) (((x) & 0x7) << 3)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_WRAP_R(x) (((x) & 0x7) << 6)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MIN_IMG_FILTER(x) (((x) & 0x3) << 9)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MIN_IMG_FILTER(x) (((x) & 0x1) << 9) /* Used to be 2 bits wide */
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MIN_MIP_FILTER(x) (((x) & 0x3) << 11)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MAG_IMG_FILTER(x) (((x) & 0x3) << 13)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MAG_IMG_FILTER(x) (((x) & 0x1) << 13) /* Used to be 2 bits wide */
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_COMPARE_MODE(x) (((x) & 0x1) << 15)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_COMPARE_FUNC(x) (((x) & 0x7) << 16)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_SEAMLESS_CUBE_MAP(x) (((x) & 0x1) << 19)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MAX_ANISOTROPY(x) (((x & 0x3f)) << 20)
|
||||
#define VIRGL_OBJ_SAMPLE_STATE_S0_MAX_ANISOTROPY(x) (((x & 0x1f)) << 20) /* Used to be 6 bits wide */
|
||||
|
||||
#define VIRGL_OBJ_SAMPLER_STATE_LOD_BIAS 3
|
||||
#define VIRGL_OBJ_SAMPLER_STATE_MIN_LOD 4
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue