intel: fix XGL_TOPOLOGY_POINT_LIST
Setting "Point Sprite Texture Coordinate Enable" to 0xffffffffu does not mean
"always enable point sprites", but means "treat all attributes as
gl_PointCoord". Fix the field to only set the bit for gl_PointCoord.
diff --git a/icd/intel/compiler/pipeline/pipeline_compiler_interface.cpp b/icd/intel/compiler/pipeline/pipeline_compiler_interface.cpp
index ffbd490..ed246b1 100644
--- a/icd/intel/compiler/pipeline/pipeline_compiler_interface.cpp
+++ b/icd/intel/compiler/pipeline/pipeline_compiler_interface.cpp
@@ -651,6 +651,9 @@
// Ensure this is 1:1, or create a converter
pipe_shader->barycentric_interps = data->barycentric_interp_modes;
+ if (data->urb_setup[VARYING_SLOT_PNTC] >= 0)
+ pipe_shader->point_sprite_enables = 1 << data->urb_setup[VARYING_SLOT_PNTC];
+
struct brw_stage_state *stage_state = &brw->wm.base;
pipe_shader->sampler_count = stage_state->sampler_count;
diff --git a/icd/intel/pipeline.c b/icd/intel/pipeline.c
index 7ad396b..f609e31 100644
--- a/icd/intel/pipeline.c
+++ b/icd/intel/pipeline.c
@@ -944,7 +944,9 @@
}
if (info->ia.topology == XGL_TOPOLOGY_POINT_LIST)
- body[10] = 0xffffffffu; /* point sprite enables */
+ body[10] = fs->point_sprite_enables;
+ else
+ body[10] = 0;
body[11] = 0; /* constant interpolation enables */
body[12] = 0; /* WrapShortest enables */
diff --git a/icd/intel/pipeline.h b/icd/intel/pipeline.h
index 04a8a3e..e229656 100644
--- a/icd/intel/pipeline.h
+++ b/icd/intel/pipeline.h
@@ -133,6 +133,7 @@
uint32_t offset_16;
XGL_FLAGS barycentric_interps;
+ XGL_FLAGS point_sprite_enables;
XGL_GPU_SIZE per_thread_scratch_size;