#[Bug] Codegen corrruption

1 messages · Page 1 of 1 (latest)

lost oyster
#

Code below causes codegen corruption in some way. Resulting in Job2 creating a query that doesn't match entities with Enablable(true);Buffer1;Buffer2 components.

Simply commenting scheduling of Job1 causes Job2 to function properly again.

@brazen copper

        public void OnUpdate(ref SystemState state)
        {
            new Job1().ScheduleParallel();
            new Job2().ScheduleParallel();
        }

        [BurstCompile]
        [WithDisabled(typeof(Enablable))]
        [WithChangeFilter(typeof(Enablable))]
        private partial struct Job1: IJobEntity
        {
            private void Execute(ref DynamicBuffer<Buffer1> filters)
            {
            }
        }

        [BurstCompile]
        [WithAll(typeof(Enablable))]
        private partial struct Job2: IJobEntity
        {
            private void Execute(ref DynamicBuffer<Buffer1> hits, ref DynamicBuffer<Buffer2> filters)
#

Some misc details that potentially could be relevant:
Enablable is a IEnablable component with a couple of Entity fields.
Both Buffer1 and Buffer2 are IBufferElementData with just a single Entity field.

#

[Bug] Codegen corrruption

queen marsh
#

Think this is a ping for dani

#

From memory the with disabled with change filter combo is at fault

#

With change filter adds like an all or something (not at pc)

lost oyster
#

it's second job that got broken by first job

queen marsh
#

Yeah I think it's making the queries match

lost oyster
queen marsh
#

What's the actual code gen look like out of interest

lost oyster
#

Buffer2

queen marsh
#

Oh wait I missed that, thought it was only 2 components not 3

lost oyster
#

yeah, exactly

queen marsh
#

Well no idea then, very curious what query is using

brazen copper
#

yep @oak peak

oak peak
#

Oh no, well, so yeah what is the generated output? 😆

lost oyster
#

eh, I didn't take a look. Was focused on just making it work asap

oak peak
#

Well, depending on how long eating food takes me I might take a look in a bit.. you have nerdsnipped me a little 😆