52 lines
2.0 KiB
Diff
52 lines
2.0 KiB
Diff
From 5d03711f88643b6b6639aebd8983c179cdd248b0 Mon Sep 17 00:00:00 2001
|
|
From: Gert Wollny <gert.wollny@collabora.com>
|
|
Date: Mon, 7 Oct 2019 17:15:37 +0200
|
|
Subject: [PATCH] vrend: Keep the max texture sizes in the vrend_state
|
|
|
|
This is needed to check the resource creation parameters.
|
|
|
|
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
|
|
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
|
|
---
|
|
src/vrend_renderer.c | 13 +++++++++++++
|
|
1 file changed, 13 insertions(+)
|
|
|
|
diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c
|
|
index 28ce9bd..613fac9 100644
|
|
--- a/src/vrend_renderer.c
|
|
+++ b/src/vrend_renderer.c
|
|
@@ -233,6 +233,9 @@ struct global_renderer_state {
|
|
bool use_explicit_locations;
|
|
uint32_t max_uniform_blocks;
|
|
uint32_t max_draw_buffers;
|
|
+ uint32_t max_texture_2d_size;
|
|
+ uint32_t max_texture_3d_size;
|
|
+ uint32_t max_texture_cube_size;
|
|
struct list_head active_ctx_list;
|
|
|
|
/* threaded sync */
|
|
@@ -5182,6 +5182,10 @@ int vrend_renderer_init(struct vrend_if_cbs *cbs, uint32_t flags)
|
|
vrend_state.inited = true;
|
|
vrend_object_init_resource_table();
|
|
vrend_clicbs = cbs;
|
|
+ /* Give some defaults to be able to run the tests */
|
|
+ vrend_state.max_texture_2d_size =
|
|
+ vrend_state.max_texture_3d_size =
|
|
+ vrend_state.max_texture_cube_size = 16384;
|
|
}
|
|
|
|
ctx_params.shared = false;
|
|
@@ -8204,6 +8211,9 @@ static void vrend_renderer_fill_caps_v2(int gl_ver, int gles_ver, union virgl_c
|
|
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_2d_size);
|
|
glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_3d_size);
|
|
glGetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, (GLint*)&caps->v2.max_texture_cube_size);
|
|
+ vrend_state.max_texture_2d_size = caps->v2.max_texture_2d_size;
|
|
+ vrend_state.max_texture_3d_size = caps->v2.max_texture_3d_size;
|
|
+ vrend_state.max_texture_cube_size = caps->v2.max_texture_cube_size;
|
|
|
|
if (has_feature(feat_geometry_shader)) {
|
|
glGetIntegerv(GL_MAX_GEOMETRY_OUTPUT_VERTICES, (GLint*)&caps->v2.max_geom_output_vertices);
|
|
--
|
|
1.8.3.1
|
|
|