shader: Enable GL_OES_geometry_point_size when needed

Closes: #19

Fixes:
  dEQP-GLES31.functional.geometry_shading.basic.point_size

  dEQP-GLES31.functional.primitive_bounding_box.wide_points.
    global_state.vertex_geometry_fragment.
      default_framebuffer_bbox_equal
      default_framebuffer_bbox_larger
      default_framebuffer_bbox_smaller
      fbo_bbox_equal
      fbo_bbox_larger
      fbo_bbox_smaller
    tessellation_set_per_draw.vertex_tessellation_geometry_fragment.
      default_framebuffer_bbox_equal
      default_framebuffer_bbox_larger
      default_framebuffer_bbox_smaller
      fbo_bbox_equal
      fbo_bbox_larger
      fbo_bbox_smaller
    tessellation_set_per_primitive.vertex_tessellation_geometry_fragment.default_framebuffer
    tessellation_set_per_primitive.vertex_tessellation_geometry_fragment.fbo

  dEQP-GLES31.functional.tessellation_geometry_interaction.point_size.
     geometry_set
     vertex_set_geometry_set
     vertex_set_evaluation_set_geometry_set
     vertex_set_control_pass_eval_add_geometry_add

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
macos/master
Gert Wollny 6 years ago committed by Dave Airlie
parent 19cef6be4a
commit a4b3a8f950
  1. 9
      src/vrend_shader.c

@ -62,6 +62,7 @@ extern int vrend_dump_shaders;
#define SHADER_REQ_TXQS (1 << 18) #define SHADER_REQ_TXQS (1 << 18)
#define SHADER_REQ_FBFETCH (1 << 19) #define SHADER_REQ_FBFETCH (1 << 19)
#define SHADER_REQ_SHADER_CLOCK (1 << 20) #define SHADER_REQ_SHADER_CLOCK (1 << 20)
#define SHADER_REQ_PSIZE (1 << 21)
struct vrend_shader_io { struct vrend_shader_io {
unsigned name; unsigned name;
@ -808,6 +809,7 @@ iter_declaration(struct tgsi_iterate_context *iter,
ctx->inputs[i].glsl_no_index = true; ctx->inputs[i].glsl_no_index = true;
ctx->inputs[i].override_no_wm = true; ctx->inputs[i].override_no_wm = true;
ctx->inputs[i].glsl_gl_block = true; ctx->inputs[i].glsl_gl_block = true;
ctx->shader_req_bits |= SHADER_REQ_PSIZE;
break; break;
} }
/* fallthrough */ /* fallthrough */
@ -1035,6 +1037,7 @@ iter_declaration(struct tgsi_iterate_context *iter,
ctx->outputs[i].glsl_predefined_no_emit = true; ctx->outputs[i].glsl_predefined_no_emit = true;
ctx->outputs[i].glsl_no_index = true; ctx->outputs[i].glsl_no_index = true;
ctx->outputs[i].override_no_wm = true; ctx->outputs[i].override_no_wm = true;
ctx->shader_req_bits |= SHADER_REQ_PSIZE;
name_prefix = "gl_PointSize"; name_prefix = "gl_PointSize";
if (iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL) if (iter->processor.Processor == TGSI_PROCESSOR_TESS_CTRL)
ctx->outputs[i].glsl_gl_block = true; ctx->outputs[i].glsl_gl_block = true;
@ -3993,8 +3996,12 @@ static char *emit_header(struct dump_ctx *ctx, char *glsl_hdr)
STRCAT_WITH_RET(glsl_hdr, buf); STRCAT_WITH_RET(glsl_hdr, buf);
if (ctx->shader_req_bits & SHADER_REQ_SAMPLER_MS) if (ctx->shader_req_bits & SHADER_REQ_SAMPLER_MS)
STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_texture_storage_multisample_2d_array : require\n"); STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_texture_storage_multisample_2d_array : require\n");
if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY)
if (ctx->prog_type == TGSI_PROCESSOR_GEOMETRY) {
STRCAT_WITH_RET(glsl_hdr, "#extension GL_EXT_geometry_shader : require\n"); STRCAT_WITH_RET(glsl_hdr, "#extension GL_EXT_geometry_shader : require\n");
if (ctx->shader_req_bits & SHADER_REQ_PSIZE)
STRCAT_WITH_RET(glsl_hdr, "#extension GL_OES_geometry_point_size : enable\n");
}
if ((ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL || if ((ctx->prog_type == TGSI_PROCESSOR_TESS_CTRL ||
ctx->prog_type == TGSI_PROCESSOR_TESS_EVAL)) { ctx->prog_type == TGSI_PROCESSOR_TESS_EVAL)) {

Loading…
Cancel
Save