title: Vulkan Push Constants never assigned or updated
body: <p>I have been reading through Sascha Willem's example on push constants <a href="https://github.com/SaschaWillems/Vulkan/blob/b9f0ac91d2adccc3055a904d3a8f6553b10ff6cd/examples/pushconstants/pushconstants.cpp" rel="nofollow noreferrer">here</a> and have attempted to implement them myself.</p>
  <p><s>Oddly the <code>VkPhysicalDeviceProperties.limits.maxPushConstantsSize</code> is <code>1437341456</code> bytes which makes me think something else is very wrong.</s> After rechecking it is showing as a more realistic value of <code>256</code> (I assume I did something incorrectly previously)</p>
  <p>In my test project I have uniform buffers working, and I then started to tinker with push constants which will hopefully explain the inbetween state of my vertex shader</p>
  <p>Here are some details of what I implemented:
  From what I understand, on creating a pipeline layout I need to specify the push constant ranges, which I do like so:</p>
  <pre><code>VkPushConstantRange pushConstantRange {};
  pushConstantRange.stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
  pushConstantRange.offset = 0;
  pushConstantRange.size = sizeof(ObjectPushConstantData);
  </code></pre>
  <p>And I add the push constant ranges to the pipeline layout CI like so:</p>
  <pre><code>pipelineLayoutInfo.pushConstantRangeCount = 1;
  pipelineLayoutInfo.pPushConstantRanges = &amp;pushConstantRange;
  </code></pre>
  <p>When creating my command buffers, I'm calling <code>vkCmdPushConstants</code> before drawing like so:</p>
  <pre><code>vkCmdPushConstants(this-&gt;commandBuffers[i], this-&gt;pipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, 0, static_cast&lt;uint32_t&gt;(sizeof(ObjectPushConstantData)), &amp;testObject);
  vkCmdDrawIndexed(this-&gt;commandBuffers[i], static_cast&lt;uint32_t&gt;(indices.size()), 1, 0, 0, 0);
     
  </code></pre>
  <p>The type <code>ObjectPushConstantData</code> looks like so:</p>
  <pre><code>struct ObjectPushConstantData {
      glm::vec3 position;
      glm::vec3 rotation;
  };
  </code></pre>
  <p>My vertex shader looks like this:</p>
  <pre><code>#version 450
  #extension GL_ARB_separate_shader_objects : enable
  
  layout(binding = 0) uniform UniformBufferObject {
      mat4 model;
      mat4 view;
      mat4 proj;
  } ubo;
  
  layout(location = 0) in vec3 inPosition;
  layout(location = 1) in vec3 inColor;
  
  layout(push_constant) uniform PushConsts {
      vec3 position;
      vec3 rotation;
  } pushConsts;
  
  layout(location = 0) out vec3 fragColor;
  
  void main() {
      gl_Position = ubo.proj * ubo.view * ubo.model * vec4(pushConsts.position, 1.0);
      fragColor = inColor;
  }    
  
   
  </code></pre>