vrend: Sync some constants with mesa and pass max_shader_samplers

This is needed for modern games that require more than 16 samplers.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: John Bates <jbates@chromium.org>
macos/master
Gert Wollny 3 years ago
parent c4c8b3e6b8
commit d755dfa28c
  1. 4
      src/gallium/include/pipe/p_state.h
  2. 1
      src/virgl_hw.h
  3. 2
      src/vrend_renderer.c

@ -57,10 +57,10 @@ extern "C" {
#define PIPE_MAX_CLIP_PLANES 8 #define PIPE_MAX_CLIP_PLANES 8
#define PIPE_MAX_COLOR_BUFS 8 #define PIPE_MAX_COLOR_BUFS 8
#define PIPE_MAX_CONSTANT_BUFFERS 32 #define PIPE_MAX_CONSTANT_BUFFERS 32
#define PIPE_MAX_SAMPLERS 16 #define PIPE_MAX_SAMPLERS 32
#define PIPE_MAX_SHADER_INPUTS 80 /* 32 GENERIC + 32 PATCH + 16 others */ #define PIPE_MAX_SHADER_INPUTS 80 /* 32 GENERIC + 32 PATCH + 16 others */
#define PIPE_MAX_SHADER_OUTPUTS 80 /* 32 GENERIC + 32 PATCH + 16 others */ #define PIPE_MAX_SHADER_OUTPUTS 80 /* 32 GENERIC + 32 PATCH + 16 others */
#define PIPE_MAX_SHADER_SAMPLER_VIEWS 32 #define PIPE_MAX_SHADER_SAMPLER_VIEWS 128
#define PIPE_MAX_SHADER_BUFFERS 32 #define PIPE_MAX_SHADER_BUFFERS 32
#define PIPE_MAX_SHADER_IMAGES 32 #define PIPE_MAX_SHADER_IMAGES 32
#define PIPE_MAX_TEXTURE_LEVELS 16 #define PIPE_MAX_TEXTURE_LEVELS 16

@ -597,6 +597,7 @@ struct virgl_caps_v2 {
uint32_t max_video_memory; uint32_t max_video_memory;
char renderer[64]; char renderer[64];
float max_anisotropy; float max_anisotropy;
uint32_t max_texture_image_units;
}; };
union virgl_caps { union virgl_caps {

@ -10852,6 +10852,8 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
caps->v2.max_anisotropy = MIN2(max_aniso, 16.0); caps->v2.max_anisotropy = MIN2(max_aniso, 16.0);
} }
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &max);
caps->v2.max_texture_image_units = max;
} }
void vrend_renderer_fill_caps(uint32_t set, uint32_t version, void vrend_renderer_fill_caps(uint32_t set, uint32_t version,

Loading…
Cancel
Save