#include "svga3d_shaderdefs.h"
-#define SVGA_MAX_POINTSIZE 80.0
-
struct draw_vertex_shader;
struct draw_fragment_shader;
struct svga_shader_result;
case PIPE_CAPF_MAX_POINT_WIDTH:
/* fall-through */
case PIPE_CAPF_MAX_POINT_WIDTH_AA:
- /* Keep this to a reasonable size to avoid failures in
- * conform/pntaa.c:
- */
- return SVGA_MAX_POINTSIZE;
+ return svgascreen->maxPointSize;
case PIPE_CAPF_MAX_TEXTURE_ANISOTROPY:
if(!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY, &result))
}
}
+ if (!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_POINT_SIZE, &result)) {
+ svgascreen->maxPointSize = 1.0F;
+ } else {
+ /* Keep this to a reasonable size to avoid failures in
+ * conform/pntaa.c:
+ */
+ svgascreen->maxPointSize = MIN2(result.f, 80.0f);
+ }
+
pipe_mutex_init(svgascreen->tex_mutex);
pipe_mutex_init(svgascreen->swc_mutex);
SVGA3dHardwareVersion hw_version;
+ float maxPointSize;
+
struct {
boolean force_level_surface_view;
boolean force_surface_view;
#include "util/u_math.h"
#include "svga_context.h"
+#include "svga_screen.h"
#include "svga_state.h"
#include "svga_cmd.h"
static int emit_rss( struct svga_context *svga,
unsigned dirty )
{
+ struct svga_screen *screen = svga_screen(svga->pipe.screen);
struct rs_queue queue;
float point_size_min;
EMIT_RS( svga, curr->linepattern, LINEPATTERN, fail );
EMIT_RS_FLOAT( svga, curr->pointsize, POINTSIZE, fail );
EMIT_RS_FLOAT( svga, point_size_min, POINTSIZEMIN, fail );
- EMIT_RS_FLOAT( svga, SVGA_MAX_POINTSIZE, POINTSIZEMAX, fail );
+ EMIT_RS_FLOAT( svga, screen->maxPointSize, POINTSIZEMAX, fail );
EMIT_RS( svga, curr->pointsprite, POINTSPRITEENABLE, fail);
}