Pierre Moreau <[email protected]> writes: > Besides parsing all the opcodes until reaching the EOF character, there > is no way to compute the size of a SPIR-V binary. Therefore, it is > easier to pass it along the SPIR-V binary in pipe_compute_state. >
LLVM IR programs use pipe_llvm_program_header in order to provide the same information. Not necessarily opposed to doing it this way but I think it would make sense for the SPIR-V and LLVM paths to use the same mechanism. > Signed-off-by: Pierre Moreau <[email protected]> > --- > src/gallium/include/pipe/p_state.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/src/gallium/include/pipe/p_state.h > b/src/gallium/include/pipe/p_state.h > index ce9ca34d29..1f8fdf530f 100644 > --- a/src/gallium/include/pipe/p_state.h > +++ b/src/gallium/include/pipe/p_state.h > @@ -810,6 +810,7 @@ struct pipe_compute_state > { > enum pipe_shader_ir ir_type; /**< IR type contained in prog. */ > const void *prog; /**< Compute program to be executed. */ > + unsigned prog_num_bytes; /**< Program size in bytes, used by SPIR-V. */ > unsigned req_local_mem; /**< Required size of the LOCAL resource. */ > unsigned req_private_mem; /**< Required size of the PRIVATE resource. */ > unsigned req_input_mem; /**< Required size of the INPUT resource. */ > -- > 2.12.2 > > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
