38 format->deinterleaved =
false;
41 format->attrs[i].name_len = 0;
57 const uint sizes[] = {1, 1, 2, 2, 4, 4, 4};
75 if (
a->comp_len == 3 &&
c <= 2) {
87 return format->stride * vertex_len;
94 char *name_copy =
format->names + name_offset;
96 bool terminated =
false;
98 for (
uint i = 0; i < available; i++) {
99 const char c = name[i];
103 format->name_offset += (i + 1);
126 assert((comp_len >= 1 && comp_len <= 4) || comp_len == 8 || comp_len == 12 || comp_len == 16);
136 assert(
ELEM(comp_len, 3, 4));
146 assert(!
ELEM(comp_len, 8, 12, 16));
191 int attr_len =
format->attr_len;
192 for (
int i = 0; i < attr_len; i++, attr++) {
194 for (
int j = 1; j < load_count; j++) {
196 BLI_snprintf(load_name,
sizeof(load_name),
"%s%d", attr_name, j);
209 for (
int i = 0; i <
format->attr_len; i++) {
211 for (
int j = 0; j < attr->
name_len; j++) {
213 if (
STREQ(name, attr_name)) {
226 BLI_assert(strlen(attr_name) == strlen(new_name));
228 while (attr_name[i] !=
'\0') {
229 attr_name[i] = new_name[i];
238 char safe_chars[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
241 for (
int i = 0; i < 11; i++) {
242 out[i] = safe_chars[in % 62lu];
254 for (
int i = 0; i < 4; i++) {
255 data[i] = attr_name[i];
265 for (
int i = 0; i < 8 && attr_name[i] !=
'\0'; i++) {
266 data[i] = attr_name[i];
272 r_safe_name[11] =
'\0';
276 printf(
"%s > %lx > %s\n", attr_name, *(
uint64_t *)
data, r_safe_name);
287 format->deinterleaved =
true;
293 return (
mod == 0) ? 0 : (alignment -
mod);
299 const char c =
'A' + a_idx;
300 for (
uint i = 0; i <
pad; i++) {
316 show_pack(0, a0->
size, 0);
319 for (
uint a_idx = 1; a_idx <
format->attr_len; a_idx++) {
327 show_pack(a_idx,
a->size, mid_padding);
334 show_pack(0, 0, end_padding);
343 const Shader *shader =
reinterpret_cast<const Shader *
>(gpushader);
unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
struct GPUShader GPUShader
int pad[32 - sizeof(int)]
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
virtual void vertformat_from_shader(GPUVertFormat *) const =0
SyclQueue void void * src
SyclQueue void void size_t num_bytes void
struct @653::@656 attr_id
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
static const pxr::TfToken out("out", pxr::TfToken::Immortal)
unsigned __int64 uint64_t
uchar names[GPU_VERT_ATTR_MAX_NAMES]
ccl_device_inline int mod(int x, int m)