mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-03 22:25:57 +00:00
Fix defines in loading of graphics shader
This commit is contained in:
parent
59dece4588
commit
5c735c123a
1 changed files with 2 additions and 2 deletions
|
|
@ -195,14 +195,14 @@ class LoadShaderPrograms:
|
|||
graphics = program_for('graphics')
|
||||
|
||||
def resolve_graphics_fragment_defines(which: str, f: str) -> str:
|
||||
return f.replace('ALPHA_TYPE', which)
|
||||
return f.replace('#define ALPHA_TYPE', f'#define {which}', 1)
|
||||
|
||||
for which, p in {
|
||||
'SIMPLE': GRAPHICS_PROGRAM,
|
||||
'PREMULT': GRAPHICS_PREMULT_PROGRAM,
|
||||
'ALPHA_MASK': GRAPHICS_ALPHA_MASK_PROGRAM,
|
||||
}.items():
|
||||
graphics.apply_to_sources(frag=partial(resolve_cell_fragment_defines, which))
|
||||
graphics.apply_to_sources(frag=partial(resolve_graphics_fragment_defines, which))
|
||||
graphics.compile(p, allow_recompile)
|
||||
|
||||
program_for('bgimage').compile(BGIMAGE_PROGRAM, allow_recompile)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue