iris: delete some pointless STATIC_ASSERTS
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 13 Jun 2018 09:15:40 +0000 (02:15 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:06 +0000 (10:26 -0800)
these were useful when I was patching relocs

src/gallium/drivers/iris/iris_state.c

index d36a11d0aabdd5b534550bcecfbed1b72b3a0f8b..c7517f2c2cdfacad63231cc4d2ce252b30c9e739 100644 (file)
@@ -2544,12 +2544,10 @@ iris_upload_render_state(struct iris_context *ice,
 
    if (dirty & IRIS_DIRTY_VERTEX_BUFFERS) {
       struct iris_vertex_buffer_state *cso = ice->state.cso_vertex_buffers;
-
-      STATIC_ASSERT(GENX(VERTEX_BUFFER_STATE_length) == 4);
-      STATIC_ASSERT((GENX(VERTEX_BUFFER_STATE_BufferStartingAddress_bits) % 32) == 0);
+      const unsigned vb_dwords = GENX(VERTEX_BUFFER_STATE_length);
 
       iris_batch_emit(batch, cso->vertex_buffers,
-                      sizeof(uint32_t) * (1 + 4 * cso->num_buffers));
+                      sizeof(uint32_t) * (1 + vb_dwords * cso->num_buffers));
 
       for (unsigned i = 0; i < cso->num_buffers; i++) {
          iris_use_pinned_bo(batch, cso->bos[i], false);