mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 12:28:07 +02:00
glsl: return progress in point size linking
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26976>
This commit is contained in:
parent
8fd18c4f20
commit
b3d6658d96
2 changed files with 6 additions and 2 deletions
|
|
@ -889,7 +889,7 @@ remove_dead_varyings_pre_linking(nir_shader *nir)
|
|||
* - find every gl_Position write
|
||||
* - store 1.0 to gl_PointSize after every gl_Position write
|
||||
*/
|
||||
void
|
||||
bool
|
||||
gl_nir_add_point_size(nir_shader *nir)
|
||||
{
|
||||
nir_variable *psiz = nir_create_variable_with_location(nir, nir_var_shader_out,
|
||||
|
|
@ -921,6 +921,10 @@ gl_nir_add_point_size(nir_shader *nir)
|
|||
nir_deref_instr *deref = nir_build_deref_var(&b, psiz);
|
||||
nir_store_deref(&b, deref, nir_imm_float(&b, 1.0), BITFIELD_BIT(0));
|
||||
}
|
||||
|
||||
/* We always modify the entrypoint */
|
||||
nir_metadata_preserve(impl, nir_metadata_block_index | nir_metadata_dominance);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ bool
|
|||
gl_nir_can_add_pointsize_to_program(const struct gl_constants *consts,
|
||||
struct gl_program *prog);
|
||||
|
||||
void
|
||||
bool
|
||||
gl_nir_add_point_size(struct nir_shader *nir);
|
||||
|
||||
bool lower_packed_varying_needs_lowering(nir_shader *shader, nir_variable *var,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue