vk/vulkan.h: Remove programPointSize
Instead, we auto-detect whether or not your shader writes gl_PointSize. If it does, we use 1.0, otherwise we take it from the shader.
This commit is contained in:
@@ -1469,7 +1469,6 @@ typedef struct {
|
||||
const void* pNext;
|
||||
bool32_t depthClipEnable;
|
||||
bool32_t rasterizerDiscardEnable;
|
||||
bool32_t programPointSize;
|
||||
VkFillMode fillMode;
|
||||
VkCullMode cullMode;
|
||||
VkFrontFace frontFace;
|
||||
|
@@ -1018,6 +1018,8 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline)
|
||||
int name = 0;
|
||||
struct brw_context *brw = compiler->brw;
|
||||
|
||||
pipeline->writes_point_size = false;
|
||||
|
||||
/* When we free the pipeline, we detect stages based on the NULL status
|
||||
* of various prog_data pointers. Make them NULL by default.
|
||||
*/
|
||||
@@ -1086,6 +1088,9 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline)
|
||||
fail_if(!success, "do_wm_prog failed\n");
|
||||
add_compiled_stage(pipeline, VK_SHADER_STAGE_VERTEX,
|
||||
&pipeline->vs_prog_data.base.base);
|
||||
|
||||
if (vp->Base.OutputsWritten & VARYING_SLOT_PSIZ)
|
||||
pipeline->writes_point_size = true;
|
||||
} else {
|
||||
memset(&pipeline->vs_prog_data, 0, sizeof(pipeline->vs_prog_data));
|
||||
pipeline->vs_simd8 = NO_KERNEL;
|
||||
@@ -1104,6 +1109,9 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline)
|
||||
fail_if(!success, "do_gs_prog failed\n");
|
||||
add_compiled_stage(pipeline, VK_SHADER_STAGE_GEOMETRY,
|
||||
&pipeline->gs_prog_data.base.base);
|
||||
|
||||
if (gp->Base.OutputsWritten & VARYING_SLOT_PSIZ)
|
||||
pipeline->writes_point_size = true;
|
||||
} else {
|
||||
pipeline->gs_vec4 = NO_KERNEL;
|
||||
}
|
||||
|
@@ -2034,7 +2034,6 @@ VkResult anv_CreateDynamicRasterState(
|
||||
struct GEN8_3DSTATE_SF sf = {
|
||||
GEN8_3DSTATE_SF_header,
|
||||
.LineWidth = pCreateInfo->lineWidth,
|
||||
.PointWidth = 1.0,
|
||||
};
|
||||
|
||||
GEN8_3DSTATE_SF_pack(NULL, state->state_sf, &sf);
|
||||
|
@@ -184,7 +184,8 @@ emit_rs_state(struct anv_pipeline *pipeline, VkPipelineRsStateCreateInfo *info,
|
||||
.TriangleStripListProvokingVertexSelect = 0,
|
||||
.LineStripListProvokingVertexSelect = 0,
|
||||
.TriangleFanProvokingVertexSelect = 0,
|
||||
.PointWidthSource = info->programPointSize ? Vertex : State,
|
||||
.PointWidthSource = pipeline->writes_point_size ? Vertex : State,
|
||||
.PointWidth = 1.0,
|
||||
};
|
||||
|
||||
/* FINISHME: bool32_t rasterizerDiscardEnable; */
|
||||
|
@@ -733,6 +733,7 @@ struct anv_pipeline {
|
||||
struct brw_wm_prog_data wm_prog_data;
|
||||
struct brw_gs_prog_data gs_prog_data;
|
||||
struct brw_cs_prog_data cs_prog_data;
|
||||
bool writes_point_size;
|
||||
struct brw_stage_prog_data * prog_data[VK_SHADER_STAGE_NUM];
|
||||
uint32_t scratch_start[VK_SHADER_STAGE_NUM];
|
||||
uint32_t total_scratch;
|
||||
|
Reference in New Issue
Block a user